1 2006-08-28 Jason Merrill <jason@redhat.com>
4 * class.c (check_field_decls): Unset TYPE_PACKED (t) if one of the
5 fields can't be packed.
8 * cvt.c (convert_to_void): Don't automatically load from volatiles
9 of TREE_ADDRESSABLE type.
11 2006-08-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
14 * cp-tree.h (maybe_process_partial_specialization): Return
16 * parser.c (cp_parser_class_head): Use return value of
17 maybe_process_partial_specialization.
18 * pt.c (maybe_process_partial_specialization): Return error_mark_node
19 for broken specializations, TYPE otherwise. Check for template
22 2006-08-27 Mark Mitchell <mark@codesourcery.com>
25 * pt.c (register_specialization): Return error_mark_node for
26 specialization-after-instantiation.
27 * decl2.c (mark_used): Mark the main function used when one of its
30 2006-08-27 Lee Millward <lee.millward@codesourcery.com>
33 * class.c (check_field_decls): Don't issue error about
34 local classes containing static data members.
36 2006-08-26 Joseph S. Myers <joseph@codesourcery.com>
39 * parser.c (struct cp_token): Add input_file_stack_index.
41 (cp_lexer_get_preprocessor_token): Save input_file_stack_tick.
42 (cp_lexer_set_source_position_from_token): Restore input file
45 2006-08-26 Lee Millward <lee.millward@codesourcery.com>
50 * pt.c (process_template_parm): Store invalid template
51 parameters as a TREE_LIST with a TREE_VALUE of error_mark_node.
52 (push_inline_template_parms_recursive): Check for template
53 parameters having a TREE_VALUE of error_mark_node rather than
54 check the parameter itself.
55 (mangle_class_name_for_template): Likewise.
56 (comp_template_parms): When comparing the individual template
57 parameters, return 1 if either is error_mark_node.
58 (current_template_args): Robustify.
59 (redeclare_class_template): Likewise.
61 2006-08-26 Mark Mitchell <mark@codesourcery.com>
64 * class.c (resolve_address_of_overloaded_function): Add
65 access_path parameter. Perform access checks.
66 (instantiate_type): Adjust call to
67 resolve_address_of_overloaded_function. Remove unnecessary code.
68 * tree.c (is_overloaded_fn): Document. Return 2 when there are
69 acutally multiple functions.
70 (really_overloaded_fn): Use is_overloaded_fn.
71 * mangle.c (write_expression): Handle BASELINKs.
72 * cp-tree.h (really_overloaded_fn): Return bool.
73 (baselink_for_fns): Declare.
74 * search.c (lookup_member): Check access for single static
76 * pt.c (convert_nontype_argument_function): Handle BASELINKs.
77 (tsubst_copy_and_build): Generate BASELINKs for template-ids.
78 * semantics.c (finish_call_expr): Use baselink_for_fns.
79 (baselink_for_fns): New function.
80 (finish_id_expression): Use it.
81 * parser.c (cp_parser_template_argument): Don't strip BASELINKs.
84 * pt.c (tsubst): Issue errors about attempts to create VLAs at
85 template-instantiation time.
87 2006-08-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
90 * typeck2.c (cxx_incomplete_type_diagnostic): Handle template
91 template parameters. Improve error message for template type
95 * cp-tree.h (grok_op_properties): Return bool instead of void.
96 * decl.c (grokfndecl): Discard invalid operator declarations.
97 (copy_fn_p): Revert change for PR 27547.
98 (grok_op_properties): Return error status (true on success).
99 * pt.c (tsubst_decl): Discard invalid operator declarations.
101 2006-08-25 Mark Mitchell <mark@codesourcery.com>
104 * decl.c (grokdeclarator): Disallow declarations with qualified
105 names in local scopes.
107 2006-08-25 Nathan Sidwell <nathan@codesourcery.com>
110 * decl.c (make_typename_type): Only try and resolve it when
111 context is not dependent. Refactor.
112 * decl2.c (check_classfn): Push to class scope before looking for
115 2006-08-24 Danny Smith <dannysmith@users.sourceforge.net>
118 * g++spec.c (lang_specific_driver): Always check if we need to
119 swallow a space-separated arg to '-x'.
120 * lang-specs.h: Don't create ouput files for '-xc++-header'
123 2006-08-23 Jason Merrill <jason@redhat.com>
126 * pt.c (push_template_decl_real): A friend template with class
129 2006-08-23 Benjamin Smedberg <benjamin@smedbergs.us>
132 * rtti.c (build_dynamic_cast, build_dynamic_cast_1):
133 Move -fno-rtti check to be more specific.
135 2006-08-22 Jason Merrill <jason@redhat.com>
138 * call.c (build_over_call): Don't make a copy here if build_call
141 2006-08-22 Andrew Pinski <pinskia@physics.uc.edu>
144 * cp/init.c (build_zero_init): Handle VECTOR_TYPE and
147 2006-08-22 Simon Martin <simartin@users.sourceforge.net>
150 * parser.c (cp_parser_postfix_expression): Make sure that the
151 saved value for parser->type_definition_forbidden_message is
152 restored before returning to avoid an invalid free().
154 2006-08-22 Jason Merrill <jason@redhat.com>
157 * typeck.c (merge_types): If either of the types have the right
158 attributes, return that one.
160 * tree.c (cp_build_type_attribute_variant): Make sure we aren't
161 doing this to class types.
162 * typeck.c (original_type): Deal with type quals properly.
164 2006-08-21 Jason Merrill <jason@redhat.com>
167 * semantics.c (finish_stmt_expr_expr): Don't try to voidify here,
168 just leave the expression as it is.
169 (finish_stmt_expr): If the statement-expression has class type,
170 wrap it in a TARGET_EXPR.
171 * cp-gimplify.c (cp_gimplify_init_expr): Don't bother with
173 * except.c (build_throw): Give the CLEANUP_POINT_EXPR void type.
175 2006-08-21 Lee Millward <lee.millward@codesourcery.com>
178 * decl.c (duplicate_decls): Return early if either
179 newdecl or olddecl is error_mark_node.
182 * decl.c (grokdeclarator): Return early after
183 issuing diagnostic about an incomplete type.
186 * tree.c (decl_anon_ns_mem_p): Robustify.
187 * decl2.c (determine_visibility): Likewise.
189 2006-08-20 Mark Mitchell <mark@codesourcery.com>
192 * tree.c (cast_valid_in_integral_constant_expression_p): New
194 * cp-tree.h (tsubst_copy_and_build): Adjust prototype.
195 * pt.c (tsubst_expr): Add integral_constant_expression_p
197 (fold_non_dependent_expr): Adjust callers of
198 tsubst_{expr,copy_and_build}.
199 (tsubst_friend_function): Likewise.
200 (tsubst_template_arg): Likewise.
201 (tsubst_default_argument): Likewise.
202 (tsubst_decl): Likewise.
204 (tsubst_omp_clasuses): Likewise.
205 (regenerate_decl_fromp_template): Likewise.
206 (instantiate_decl): Likewise.
207 (tsubst_initializer_list): Likewise.
208 (tsubst_enum): Likewise.
209 (tsubst_expr): Use RECUR throughout.
210 (tsubst_copy_and_build): Change definition of RECUR. Do not allow
211 invalid casts in integral constant expressions.
212 * parser.c (cp_parser_postfix_expression): Use
213 cast_valid_in_integral_constant_expression_p.
214 (cp_parser_cast_expression): Likewise.
215 (cp_parser_functional_cast): Likewise.
218 * pt.c (tsubst_qualified_id): Do not strip references from
221 2006-08-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
224 * parser.c (cp_parser_diagnose_invalid_type_name): Handle BIT_NOT_EXPR.
226 (cp_parser_parse_and_diagnose_invalid_type_name): Tighten condition
227 for valid type-names.
228 (cp_parser_unqualified_id): Fix error handling for destructors.
231 * decl.c (xref_tag): Improve error message. Return early on error.
234 * pt.c (tsubst_copy_and_build) <case CONSTRUCTOR>: Robustify.
236 2006-08-17 Paolo Bonzini <bonzini@gnu.org>
239 * semantics.c (finish_offsetof): Add new argument to fold_offsetof.
241 2006-08-16 Andrew Pinski <pinskia@physics.uc.edu>
244 * typeck.c (build_unary_op <case BIT_NOT_EXPR:>): Don't call
245 perform_integral_promotions for non integral type.
247 2006-08-16 Jason Merrill <jason@redhat.com>
250 * pt.c (tsubst) [TEMPLATE_TYPE_PARM]: Ignore quals from template
251 if arg is a function.
253 2006-08-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
256 * init.c (build_new): Return early on invalid placement.
258 2006-08-15 Lee Millward <lee.millward@codesourcery.com>
261 * pt.c (process_template_parm): Robustify.
263 2006-08-14 Steve Ellcey <sje@cup.hp.com>
267 * operators.def: Remove <?, ?>, <?=, and >?= operators.
268 * parser.c: Remove CPP_MIN, CPP_MAX, CPP_MIN_EQ, and CPP_MAX_EQ.
269 (cp_parser_warn_min_max): Remove.
271 2006-08-11 Jason Merrill <jason@redhat.com>
274 * parser.c (cp_parser_elaborated_type_specifier): Also ignore
275 attributes applied to a TYPENAME_TYPE.
277 2006-08-09 Lee Millward <lee.millward@codesourcery.com>
280 * pt.c (coerce_template_parms): Copy across the
281 invalid template arguments to the new template inner arguments.
282 (retrieve_specialization): Robustify.
285 * pt.c (coerce_template_template_parms): Robustify.
288 * error.c (dump_template_parms): Robustify.
291 * pt.c (redeclare_class_template): Robustify.
294 * pt.c (type_unification_real): Robustify.
296 2006-08-03 Lee Millward <lee.millward@codesourcery.com>
299 * decl.c (start_decl): Return error_mark_node if a
300 diagnostic was issed for an invalid typedef initialization.
302 2006-08-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
305 * parser.c (cp_parser_unqualified_id): Check for invalid scopes
306 when parsing destructor names.
309 * decl.c (duplicate_decls): Call check_default_args here.
310 (start_preparsed_function): Do not call check_default_args.
311 * name-lookup.c (pushdecl_maybe_friend): Only call
312 check_default_args if duplicate_decls got bypassed.
314 2006-08-02 Richard Guenther <rguenther@suse.de>
318 2006-07-05 Richard Guenther <rguenther@suse.de>
319 Andrew Pinski <pinskia@gcc.gnu.org>
322 * cp-objcp-common.c (cxx_types_compatible_p): Ignore
323 top level qualifiers for pointer type comparisons.
325 2006-08-02 Mark Mitchell <mark@codesourcery.com>
328 * pt.c (tsubst_baselink): Substitute into BASELINK_OPTYPE.
330 2006-07-31 Mark Mitchell <mark@codesourcery.com>
333 * tree.c (stabilize_expr): Tweak documentation. Add assertion.
334 (stabilize_call): Tweak documentation.
335 (stabilize_init): Only call stabilize_call for calls.
337 2006-08-01 Steve Ellcey <sje@cup.hp.com>
340 * decl2.c (check_classfn): Remove early return.
341 * search.c (lookup_member): Return NULL with bad type.
343 2006-08-01 Steve Ellcey <sje@cup.hp.com>
346 * decl.c (check_initializer): Check for 1 initializer on scalar types.
348 2006-08-01 Daniel Jacobowitz <dan@codesourcery.com>
351 * pt.c (tsubst_copy_and_build): Mark used enum types.
352 * semantics.c (finish_id_expression): Likewise.
354 2006-07-31 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
357 * decl.c (grokdeclarator): Check whether "long" or "short" was
358 specified for non-integral types.
360 2006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
362 * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
364 2006-07-28 Lee Millward <lee.millward@codesourcery.com>
368 * pt.c (process_template_parm) Store invalid template
369 parameters as error_mark_node in the paramater list.
370 (push_inline_template_parms_recursive): Handle invalid
372 (comp_template_parms): Likewise.
373 (check_default_tmpl_arg): Likewise.
374 (coerce_template_template_parms): Likewise.
375 (mangle_class_name_for_template): Likewise.
376 (tsubst_template_parms): Likewise.
377 * error.c (dump_template_argument_list): Likewise.
379 2006-07-28 Kazu Hirata <kazu@codesourcery.com>
381 * cp-tree.h: Fix a comment typo.
383 2006-07-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
386 * decl.c (grokdeclarator): Return error_mark_node after invalid
389 2006-07-23 Daniel Jacobowitz <dan@codesourcery.com>
392 * decl.c (grokvardecl): Use FROB_CONTEXT.
393 * pt.c (register_specialization): Likewise.
395 2006-07-23 Mark Mitchell <mark@codesourcery.com>
398 * cp-tree.h (LOOKUP_HIDDEN): New macro. Reformat comments.
399 * name-lookup.c (unqualified_namespace_lookup): There is no way to
400 have a hidden name in non-namespace scopes.
401 * pt.c (tsubst_friend_class): Look for hidden names.
402 * decl.c (lookup_and_check_tag): Fix typo in comment.
404 * semantics.c (finish_compound_literal): Fix typo in comment.
406 2006-07-21 Jason Merrill <jason@redhat.com>
408 * decl2.c (determine_visibility): Don't propagate visibility from
410 (constrain_class_visibility): Don't warn in system headers.
411 Don't warn about pointer fields.
413 2006-07-20 Mike Stump <mrs@apple.com>
415 * decl2.c (determine_visibility_from_class): Don't use hidden
416 visibility for explicit instantiations.
418 2006-07-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
421 * pt.c (tsubst_expr): Only apply DECL_TEMPLATE_INSTANTIATED to
422 valid decls. Cleanup.
425 * semantics.c (check_template_template_default_arg): Simplify
428 2006-07-20 Jason Merrill <jason@redhat.com>
431 * decl.c (grokvardecl): Set DECL_THIS_STATIC on file-scope
432 const variables with implicit internal linkage.
433 * tree.c (decl_linkage): Only return lk_external if it's set.
436 * decl2.c (constrain_visibility): Ignore the anonymous namespace
437 for extern "C" decls.
438 (VISIBILITY_STATIC): Rename to VISIBILITY_ANON.
440 * decl2.c (constrain_visibility): Remove specified and reason
441 parameters. Don't touch decls that already have explicit visibility.
442 (determine_visibility): Do copy DECL_VISIBILITY_SPECIFIED from
444 (determine_visibility_from_class): Reverse sense of
445 DECL_VISIBILITY_SPECIFIED test for target-specific visibility rules.
446 (constrain_class_visibility): Only complain about member visibility
447 if the member type is another class. Don't change visibility of the
450 2006-07-19 Mark Mitchell <mark@codesourcery.com>
453 * decl.c (layout_var_decl): Don't call push_local_name here.
454 (initialize_artificial_var): Assert artificiality.
455 (cp_finish_decl): Call push_local_name here.
457 2006-07-18 Mark Mitchell <mark@codesourcery.com>
460 * typeck.c (build_binary_op): Short-circuit pointer arithmetic in
463 2006-07-18 Mark Mitchell <mark@codesourcery.com>
466 * semantics.c (check_accessibility_of_qualified_id): Robustify.
469 * pt.c (tsubst_decl): Handling substitutions into a static data
470 member from within the scope of the tempalte itself.
472 2006-07-18 Lee Millward <lee.millward@gmail.com>
475 * method.c (locate_copy): Check for non_reference
476 returning error_mark_node.
479 * decl.c (duplicate_decls): Return error_mark_node
480 on ambiguous declaration.
482 2006-07-18 Steve Ellcey <sje@cup.hp.com>
485 * search.c (adjust_result_of_qualified_name_lookup): Change
486 assert to part of if statement.
488 2006-07-17 Steve Ellcey <sje@cup.hp.com>
491 * decl.c (reshape_init_class): Return error_mark_node on error.
493 2006-07-17 Steve Ellcey <sje@cup.hp.com>
496 * decl2.c (check_classfn): Return NULL_TREE on error.
498 2006-07-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
501 * name-lookup.c (pushdecl_maybe_friend): Return early on
503 * except.c (expand_start_catch_block): Use error_mark_node instead
504 of NULL_TREE for invalid decls.
505 * parser.c (cp_parser_exception_declaration): Return error_mark_node
506 on invalid catch parameter. Simplify.
508 2006-07-16 Jakub Jelinek <jakub@redhat.com>
511 * decl2.c (note_vague_linkage_var): Removed.
512 (finish_static_data_member_decl): Add decl to pending_statics vector
513 directly. Do it even for non-public decls.
515 2006-07-15 Lee Millward <lee.millward@gmail.com>
518 * decl2.c (acceptable_java_type): Robustify. Use
519 proper Boolean return type instead of return 1.
520 (check_java_method): Don't issue error about
521 type not being an acceptable Java parameter if
522 it's error_mark_node.
525 * parser.c (cp_parser_elaborated_type_specifier):
526 Return early if an invalid type was detected.
528 2006-07-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
531 * parser.c (cp_parser_check_decl_spec): New function.
532 (cp_parser_decl_specifier_seq): Factor out check for repeated
533 decl-specifiers into cp_parser_check_decl_spec. Use it.
534 (cp_parser_type_specifier_seq): Use it.
537 * semantics.c (finish_offsetof): Use TREE_OPERAND for COMPONENT_REFs
541 * decl2.c (cplus_decl_attributes): Check for invalid decls.
543 2006-07-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
546 * decl.c (cp_finish_decl): Check asmspec_tree for error_mark_node.
547 * decl2.c (grokfield): Likewise.
549 2006-07-12 Geoffrey Keating <geoffk@apple.com>
551 * decl2.c (determine_visibility): Don't change visibility of
552 function locals because of -fvisibility-inlines-hidden.
554 2006-07-12 Jason Merrill <jason@redhat.com>
557 * semantics.c (note_decl_for_pch): Don't premangle templates.
559 2006-07-12 Martin Michlmayr <tbm@cyrius.com>
561 * typeck.c (string_conv_p): Remove spurious quotation mark in
564 2006-07-07 Lee Millward <lee.millward@gmail.com>
565 Andrew Pinski <pinskia@gmail.com>
568 * decl.c (define_label): Return error_mark_node on error.
569 * semantics.c (finish_label_stmt): Don't call
570 add_stmt for invalid labels.
572 2006-07-06 Jason Merrill <jason@redhat.com>
575 * decl2.c (finish_static_data_member_decl): Don't assert
578 2006-07-05 Jason Merrill <jason@redhat.com>
582 * class.c (check_field_decls): Check TYPE_PACKED after
583 stripping array types.
584 (finish_struct_bits): Don't copy TYPE_SIZE here.
587 * friend.c (is_friend): Fix DR 45 implementation.
589 2006-07-05 Richard Guenther <rguenther@suse.de>
590 Andrew Pinski <pinskia@gcc.gnu.org>
593 * cp-objcp-common.c (cxx_types_compatible_p): Ignore
594 top level qualifiers for pointer type comparisons.
596 2006-07-01 Jason Merrill <jason@redhat.com>
599 * method.c (make_thunk): Unset DECL_USE_TEMPLATE and
602 2006-06-30 Jason Merrill <jason@redhat.com>
605 * call.c (build_new_method_call): Force evaluation of the
606 instance pointer, not the object.
608 2006-06-30 Kazu Hirata <kazu@codesourcery.com>
610 * decl2.c: Fix a comment typo.
612 2006-06-30 Jason Merrill <jason@redhat.com>
615 * decl2.c (grokfield): Only try to treat the decl as an access
616 declaration if the scope is a class.
618 2006-06-29 Jason Merrill <jason@redhat.com>
625 * decl2.c (determine_visibility): Overhaul.
626 (determine_visibility_from_class): Likewise.
627 (min_vis_r, type_visibility, constrain_visibility): New fns.
628 (constrain_visibility_for_template): Likewise.
629 (constrain_class_visibility): Likewise.
630 * decl.c (cp_finish_decl): Call determine_visibility for function
632 * name-lookup.c (pushtag): Call determine_visibility.
633 * decl.c (duplicate_decls): Don't copy visibility from template to
635 * pt.c (check_explicit_specialization): Likewise.
636 (lookup_template_class, tsubst_decl): Call determine_visibility.
637 * class.c (finish_struct_1): Call constrain_class_visibility.
642 * parser.c (cp_parser_explicit_instantiation): Pass the attributes
644 (cp_parser_type_specifier): Allow 'enum __attribute ((...)) E'.
645 (cp_parser_enum_specifier): Likewise.
646 (cp_parser_elaborated_type_specifier): Apply attributes if this
647 declares only the class.
648 (cp_parser_class_specifier): Apply leading attributes immediately.
649 * semantics.c (begin_class_definition): Add attributes parameter,
650 apply them to the type.
654 * tree.c (decl_anon_ns_mem_p): New function.
655 * cp-tree.h: Declare it.
656 * decl2.c (determine_visibility): Make anonymous namespace
658 (min_vis_r, constrain_visibility): Likewise.
659 * rtti.c (create_pseudo_type_info): Set TREE_PUBLIC on
661 * decl.c (cxx_init_decl_processing): Set TREE_PUBLIC on
663 * name-lookup.c (push_namespace_with_attribs): Don't set TREE_PUBLIC
664 on anonymous namespaces.
666 2006-06-28 Jason Merrill <jason@redhat.com>
669 * pt.c (convert_template_argument): Pass all template arguments
670 on to coerce_template_template_parms.
672 2006-06-25 Lee Millward <lee.millward@gmail.com>
673 Mark Mitchell <mark@codesuorcery.com>
676 * decl2.c (grokbitfied): Remove check for grokdeclarator
677 returning NULL_TREE, instead check for error_mark_node
679 * decl.c (grokdeclarator): Adjust block comment.
681 2006-06-25 Lee Millward <lee.millward@gmail.com>
684 * mangle.c (mangle_conv_op_name_for_type): Check for
686 * name-lookup.c (push_class_level_binding): Robustify.
687 (do_class_using_decl): Return early if name is error_mark_node.
689 2006-06-23 Steve Ellcey <sje@cup.hp.com>
692 * name-lookup.c (pushtag): Return if we have error_mark_node.
694 2006-06-23 Steve Ellcey <sje@cup.hp.com>
697 * typeck2.c (process_init_constructor_array): Set ce->value on errors.
699 2006-06-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
702 * parser.c (cp_parser_attribute_list): Skip attributes with invalid
703 arguments. Fix comment.
706 * init.c (build_new_1): Handle error_mark_nodes returned by
707 build_java_class_ref.
708 (build_java_class_ref): Do not abort compilation, but return
709 error_mark_node. Improve error message. Fix indentation.
711 2006-06-23 Danny Smith <dannysmith@users.sourceforge.net>
714 * decl.c (start_decl): Check that dllimports are not initialized.
716 2006-06-22 Lee Millward <lee.millward@gmail.com>
719 * typeck2.c (build_m_component_ref): Use error_operand_p.
722 * decl.c (grokdeclarator): Return error_mark_node on
723 invalid uses of the scope resolution operator.
725 2006-06-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
728 * pt.c (determine_specialization): Check for invalid decls.
731 * pt.c (unify) <case TEMPLATE_PARM_INDEX>: Check for invalid
735 * rtti.c (get_tinfo_decl_dynamic): Robustify.
737 2006-06-20 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
740 * init.c (push_base_cleanups): Skip members with invalid types.
741 * typeck.c (build_class_member_access_expr): Robustify.
743 2006-06-19 Mark Mitchell <mark@codesourcery.com>
745 * pt.c (instantiate_template): Fix typo in comment.
747 2006-06-19 Richard Guenther <rguenther@suse.de>
749 * parser.c (CP_LEXER_BUFFER_SIZE): Adjust to assure near
750 power-of-two token vector size.
752 2006-06-16 Mark Mitchell <mark@codesourcery.com>
755 * decl.c (cp_finsh_decl): Do not emit uninstantiated static data
759 * call.c (standard_conversion): Strip cv-qualifiers from bitfield
763 * decl.c (have_extern_spec): Remove.
764 (start_decl): Do not check have_extern_spec.
765 (start_function): Likewise.
766 * cp-tree.h (have_extern_spec): Remove.
767 * parser.c (cp_parser_linkage_specification): Don't set
769 (cp_parser_init_declarator): Likewise.
770 (cp_parser_parameter_declaration): Do not treat parameters as
771 within the scope of an unbraced linkage specification.
773 2006-06-15 Mark Mitchell <mark@codesourcery.com>
776 * cp-tree.h (CLASSTYPE_SPECIALIZATION_OF_PRIMARY_TEMPLATE_P): New
778 * pt.c (unify): Use it.
781 * call.c (build_conditional_expr): Robustify.
784 * pt.c (instantiate_template): Set processing_template_decl to
785 zero while performing substitutions.
787 2006-06-14 Mark Mitchell <mark@codesourcery.com>
790 * parser.c (cp_parser_unqualified_id): Use constructor_name_p to
791 identify destructors.
792 (cp_parser_nested_name_specifier_opt): Remove invalid
794 (cp_parser_template_id): Refine heuristic for determining whether
795 we are entering a scope.
798 * parser.c (cp_parser_declarator): Robustify.
801 * pt.c (tsubst_expr): Use finish_omp_atomic.
802 (value_dependent_expression_p): All CALL_EXPRs are dependent.
803 * semantics.c (finish_omp_atomic): Rework to use standard
804 paradigms for handling non-dependent expressions.
806 2006-06-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
808 * typeck.c (build_modify_expr): Tidy diagnostic message.
810 2006-06-14 Mark Mitchell <mark@codesourcery.com>
813 * typeck.c (build_modify_expr): Disallow array assignment.
815 2006-06-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
817 * cp-tree.def: Fix typo.
819 2006-06-13 Mark Mitchell <mark@codesourcery.com>
822 * decl.c (decls_match): Allow an extern "C" variable declarations
823 from different namespaces to match.
824 (duplicate_decls): Disallow redeclaring a variable with a
825 different linkage specification.
827 2006-06-13 Jakub Jelinek <jakub@redhat.com>
830 * cp-tree.h (cxx_int_tree_map): New struct.
831 (struct language_function): Add extern_decl_map field.
832 * name-lookup.c (pushdecl_maybe_friend): Add x -> t mapping
833 to cp_function_chain->extern_decl_map hash table instead of
834 copying over DECL_UID.
835 * cp-gimplify.c (cxx_int_tree_map_eq, cxx_int_tree_map_hash): New
837 (cp_genericize_r): Remap DECL_EXTERN local decls using
838 cp_function_chain->extern_decl_map hash table.
839 * decl.c (finish_function): Clear extern_decl_map.
841 2006-06-12 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
844 * semantics.c (finish_offsetof): Handle pseudo-destructors.
847 * name-lookup.c (lookup_qualified_name): Always return error_mark_node
851 * decl2.c (finish_anon_union): Return early if build_anon_union_vars
854 2006-06-12 Roger Sayle <roger@eyesopen.com>
857 * typeck2.c (build_functional_cast): Use cp_convert to construct
858 non-aggregate initializers instead of the user-level build_c_cast.
860 2006-06-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
863 * cp-tree.h (finish_offsetof): Add prototype.
864 * semantics.c (finish_offsetof): New function.
865 * parser.c (cp_parser_builtin_offsetof): Call it instead of
867 * pt.c (tsubst_copy_and_build): Likewise.
869 2006-06-06 Mark Mitchell <mark@codesourcery.com>
872 * call.c (standard_conversion): Require that the derived type be
873 complete when performing a derived-to-base conversion.
875 2006-06-04 Mark Mitchell <mark@codesourcery.com>
878 * decl.c (cp_finish_decl): Process initializers for static data
879 members with non-dependent initializers, even in templates.
882 * decl.c (maybe_deduce_size_from_array_init): If the declaration
883 is erroneous, give it an erroneous type.
884 (layout_var_decl): If the type is erroneous, give up.
885 (check_initializer): Likewise.
888 * cp-tree.h (TYPE_OBJ_P): New macro.
889 (TYPE_PTROB_P): Use it.
890 (TYPE_REF_OBJ_P): Likewise.
891 * semantics.c (finish_compound_literal): Do not permit compound
892 literals of non-object types.
895 * typeck.c (original_type): Robustify.
897 2006-06-05 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
900 * init.c (constant_value_1): Return decl instead of error_mark_node
901 for invalid initializers.
903 2006-06-01 Andrew Pinski <pinskia@physics.uc.edu>
906 * rtti.c (build_dynamic_cast_1): Call c_common_truthvalue_conversion
907 on operand of the COND_EXPR for the null pointer check.
909 2006-06-01 Andrew Pinski <pinskia@physics.uc.edu>
912 * typeck.c (build_unary_op): Mark the function as being used.
914 2006-06-01 Alexandre Oliva <aoliva@redhat.com>
917 * parser.c (cp_parser_initial_pragma): Read one more token for
918 caller after reading PCH file in.
920 2006-05-31 Mark Mitchell <mark@codesourcery.com>
923 * call.c (perform_implicit_conversion): Do not actually perform
924 conversions in templates.
927 * call.c (resolve_args): Check for invalid uses of bound
928 non-static member functions.
929 * init.c (build_offset_ref): Return error_mark_node for errors.
932 * decl.c (reshape_init): Robustify.
933 (reshape_init_array_1): Likewise.
935 2006-05-30 Mark Mitchell <mark@codesourcery.com>
938 * parser.c (cp_parser_decl_specifier_seq): Issue errors about
939 "friend" specifiers that do not appear in class scopes.
942 * class.c (check_bitfield_decl): Ensure that all bitfields have
945 2006-05-29 Kazu Hirata <kazu@codesourcery.com>
947 * pt.c (convert_nontype_argument): Fix a typo in an error
950 2006-05-28 Kazu Hirata <kazu@codesourcery.com>
952 * decl.c, decl2.c, parser.c: Fix comment typos. Follow
953 spelling conventions.
955 2006-05-24 Mark Mitchell <mark@codesourcery.com>
958 * decl.c (cp_make_fname_decl): Don't set DECL_INITIAL to
959 error_mark_node to indicate an initialization is OK.
960 (start_decl): Likewise. Adjust call to start_decl_1.
961 (start_decl_1): Add initialized parameter. Simplify.
962 * except.c (initialize_handler_parm): Adjust call to
964 (expand_start_catch_block): Let cp_finish_decl initialize catch
966 * cp-tree.h (start_decl_1): Adjust prototype.
967 * pt.c (tsubst_expr): Don't set DECL_INITIAL to error_mark_node.
968 (instantiate_decl): Let cp_finish_decl handle initialization.
969 * semantics.c (finish_compound_literal): Create a temporary
970 variable for the literal.
971 * typeck.c (build_unary_op): Remove COMPOUND_LITERAL_P special
973 * decl2.c (finish_static_data_member_decl): Don't set
975 (grokfield): Do not try to initialize functions.
977 2006-05-23 Mark Mitchell <mark@codesourcery.com>
980 * pt.c (determine_specialization): Disallow partial
981 specializations of templates.
983 2006-05-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
986 * typeck.c (build_modify_expr): Test arguments for error_operand_p.
988 * decl.c (grokdeclarator): Return error_mark_node instead of NULL_TREE.
990 2006-05-21 Mark Mitchell <mark@codesourcery.com>
993 * cp-tree.h (cp_save_expr): New function.
994 * init.c (build_new): Correct logic for zero-element array
995 warning. Use cp_save_expr.
996 * tree.c (cp_save_expr): New function.
998 2006-05-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1001 * decl.c (grokdeclarator): Return error_mark_node instead of NULL_TREE
1004 2006-05-19 Mike Stump <mrs@apple.com>
1006 * typeck.c (default_conversion): Remove static.
1008 2006-05-19 Mark Mitchell <mark@codesourcery.com>
1011 * cp-tree.h (begin_function_try_block): Change prototype.
1012 (finish_function_handler_sequence): Likewise.
1013 * parser.c (cp_parser_function_try_block): Adjust calls.
1014 * pt.c (tsubst_expr): Adjust calls.
1015 * semantics.c (begin_function_try_block): Create an artificial
1017 (finish_function_handler_sequence): Close it.
1019 2006-05-18 Mark Mitchell <mark@codesourcery.com>
1023 * typeck.c (decay_conversion): Convert bitfields to their declared
1024 types here. Improve documentation. Avoid use of cp_convert.
1025 (default_conversion): Make it static. Perform integral promotions
1026 before lvalue-to-rvalue, function-to-pointer, and array-to-pointer
1028 * init.c (build_init): Remove.
1029 (expand_default_init): Do not call rvalue.
1030 * call.c (null_ptr_cst_p): Robustify.
1031 (build_conditional_expr): Tidy.
1032 * except.c (build_throw): Do not perform lvalue-to-rvalue
1033 conversion on operand before initializing temporary.
1034 * tree.c (convert.h): Include it.
1035 (convert_bitfield_to_declared_type): Use convert_to_integer, not
1037 (rvalue): Don't convert bitfields to their declared type here.
1038 * cp-tree.h (build_init): Remove.
1039 (default_conversion): Likewise.
1040 * typeck2.c (build_m_component_ref): Do not perform
1041 lvalue-to-rvalue, function-to-pointer, or array-to-pointer
1042 conversions here. Correct error message.
1044 2006-05-17 Mark Mitchell <mark@codesourcery.com>
1047 * decl2.c (check_member_template): Remove checks for virtual
1049 * parser.c (cp_parser_function_specifier_opt): Complain about
1051 (cp_parser_pure_specifier): Likewise.
1054 * parser.c (cp_parser_set_storage_class): Check for
1055 invalid uses of storage classes on unbraced linkage
1057 (cp_parser_decl_specifier_seq): Pass keywords, not storage classes,
1058 to cp_parser_set_storage_class.
1060 2006-05-17 Jakub Jelinek <jakub@redhat.com>
1063 * semantics.c (finish_compound_literal): Only set TREE_HAS_CONSTRUCTOR
1067 * parser.c (cp_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
1068 on combined parallel workshare constructs.
1069 * pt.c (tsubst_expr): Copy OMP_PARALLEL_COMBINED flag.
1071 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
1074 * Make-lang.in (GXX_OBJS): Replace gcc.o with $(GCC_OBJS).
1076 2006-05-15 Mark Mitchell <mark@codesourcery.com>
1079 * cp-tree.h (perform_access_checks): New function.
1080 * semantics.c (perform_access_checks): New function.
1081 (perform_deferred_access_checks): Use it.
1082 * parser.c (cp_parser_simple_declaration): Adjust call to
1083 cp_parser_init_declarator.
1084 (cp_parser_type_parameter): Do not defer checks in default
1086 (cp_parser_explicit_specialization): Adjust call to
1087 cp_parser_single_declaration.
1088 (cp_parser_init_declarator): Perform template-parameter access
1090 (cp_parser_parameter_declaration): Do not defer checks for
1091 template parameter default arguments.
1092 (cp_parser_template_declaration_after_export): Gather access
1093 checks for template parameters, and pass them to
1094 cp_parser_single_declaration.
1095 (cp_parser_template_parameter_access_checks): New function.
1096 (cp_parser_single_declaration): Add checks parameter.
1099 * call.c (convert_like_real): Convert bitfields to their declared
1100 types when forming an rvalue.
1101 * tree.c (convert_bitfield_to_declared_type): New function.
1103 * cp-tree.h (convert_bitfield_to_declare_type): Declare it.
1105 2006-05-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1108 * pt.c (any_dependent_template_arguments_p): Return early on invalid
1112 * search.c (adjust_result_of_qualified_name_lookup): Skip on
1113 invalid context_class.
1116 * pt.c (do_decl_instantiation): Return early on invalid decl.
1119 * pt.c (push_template_decl_real): Return error_mark_node instead
1123 * pt.c (tsubst_friend_class): Return early on invalid friend
1126 2006-05-14 H.J. Lu <hongjiu.lu@intel.com>
1128 * Make-lang.in (cp/decl.o): Add dependency on $(TARGET_H).
1129 (cp/decl2.o): Likewise.
1130 (cp/typeck.o): Likewise.
1131 (cp/cvt.o): Likewise.
1132 (cp/parser.o): Likewise.
1133 (cp/call.o): Replace target.h with $(TARGET_H).
1135 2006-05-14 Alexandre Oliva <aoliva@redhat.com>
1137 * pt.c (build_non_dependent_expr): Leave ADDR_EXPR of
1138 COMPONENT_REF alone.
1140 2006-05-11 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1143 * decl.c (copy_fn_p): Return early on non-member functions.
1145 2006-05-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1148 * decl2.c (build_memfn_type): Skip invalid functions and class types.
1150 2006-05-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1153 * pt.c (convert_nontype_argument): Return early on invalid arguments.
1155 * pt.c (process_template_parm): Remove superfluous temporary.
1158 * pt.c (process_template_parm): Handle erroneous non-type parameters.
1161 * typeck.c (convert_for_initialization): Skip erroneous types.
1164 * typeck.c (convert_arguments): Return early on args with
1167 2006-05-03 Aldy Hernandez <aldyh@redhat.com>
1170 * typeck.c (build_static_cast_1): Save casted types in used types
1172 (build_reinterpret_cast_1): Same.
1173 * rtti.c (build_dynamic_cast_1): Same.
1175 2006-05-04 Jakub Jelinek <jakub@redhat.com>
1178 * parser.c (cp_parser_omp_for_loop): Only call
1179 cp_parser_abort_tentative_parse if cp_parser_parse_definitely was not
1182 2006-05-02 Mark Mitchell <mark@codesourcery.com>
1185 * decl.c (grokdeclarator): Robustify checks for defining members
1186 of incomplete types.
1189 * class.c (add_method): Call grok_special_member_properties.
1190 * decl.c (grokdeclarator): Don't call it here.
1191 (copy_fn_p): A TEMPLATE_DECL is never a copy constructor or
1192 assignment operator. Set TYPE_HAS_CONSTURCTOR if DECL is a
1194 (start_method): Don't call grok_special_member_properties.
1195 * method.c (implicitly_declare_fn): Likewise.
1196 * pt.c (instantiate_class_template): Likewise.
1197 * decl2.c (grokfield): Likewise.
1199 2006-05-02 Jakub Jelinek <jakub@redhat.com>
1202 * cp-gimplify.c (cxx_omp_privatize_by_reference): New function.
1203 * cp-tree.h (cxx_omp_privatize_by_reference): New prototype.
1204 * cp-objcp-common.h (LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Define.
1206 2006-04-30 Mark Mitchell <mark@codesourcery.com>
1209 * pt.c (tsubst_default_argument): Increment function_depth around
1210 call to tsubst_expr.
1211 * parser.c (cp_parser_parameter_declaration): Likewise.
1212 * decl2.c (mark_used): Tidy.
1214 2006-04-30 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1217 * decl.c (grok_op_properties): Skip operators with invalid args
1218 when checking for class-type or enum-type args.
1220 2006-04-29 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1223 * decl.c (copy_fn_p): Skip functions with invalid first arg.
1225 2006-04-27 Mark Mitchell <mark@codesourcery.com>
1228 * tree.c (rvalue): Convert bitfields to their declared types.
1231 * typeck2.c (cxx_incomplete_type_diagnostic): Handle
1234 2006-04-24 Mark Mitchell <mark@codesourcery.com>
1237 * typeck.c (decay_conversion): Don't adjust bitfield types.
1238 (perform_integral_promotions): Treat bitfield enums as enums, not
1239 as short integer types.
1240 * tree.c (rvalue): Convert bitfields to their correct types.
1242 2006-04-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1245 * class.c (layout_class_type): Skip fields with invalid types.
1247 2006-04-23 Mark Mitchell <mark@codesourcery.com>
1250 * cp-tree.h (build_this_parm): Declare.
1251 (grok_method_quals): Remove.
1252 (build_memfn_type): Declare.
1253 (build_artificial_parm): Declare.
1254 (do_friend): Remove quals parameter.
1255 * decl.c (build_this_parm): New function.
1256 (grokfndecl): Use it. Do not pass quals to grokclassfn.
1257 (grokdeclarator): Rename quals to memfn_quals. Avoid allocating
1258 unnecessary TYPE_DECLs. Correct qualification of member function
1260 * method.c (implicitly_declare_fn): Use build_this_parm.
1261 * friend.c (do_friend): Remove quals parameter.
1262 * decl2.c (grok_method_quals): Remove.
1263 (build_memfn_type): New function.
1264 (build_artificial_parm): Give it external linkage.
1265 (grokclassfn): Remove quals parameter. Do not build "this"
1269 * cp-tree.h (is_bitfield_expr_with_lowered_type): New function.
1270 * typeck.c (is_bitfield_expr_with_lowered_type): New function.
1271 (decay_conversion): Convert bitfield expressions to the correct
1273 (build_modify_expr): Remove spurious conversions.
1274 * class.c (layout_class_type): Modify the type of bitfields to
1275 indicate a limited range.
1276 * call.c (standard_conversion): Adjust the type of bitfield
1277 expressions used in an rvalue context.
1278 (build_conditional_expr): Likewise.
1280 2006-04-22 Kazu Hirata <kazu@codesourcery.com>
1282 * decl.c: Fix comment typos.
1284 2006-04-21 Eric Christopher <echristo@apple.com>
1286 * decl.c: Fix typo in function name.
1288 2006-04-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1291 * parser.c (cp_parser_class_name): Check for invalid typenames.
1295 * pt.c (tsubst_friend_function): Return early if
1296 pushdecl_namespace_level fails.
1299 * typeck.c (convert_arguments): Return error_mark_node instead of
1301 * cp-tree.h (error_mark_list): Remove declaration.
1302 * decl.c (error_mark_list): Remove definition.
1303 (cxx_init_decl_processing): Do not initialize error_mark_list.
1306 * rtti.c (build_dynamic_cast_1): Check for invalid conversions
1307 before calling convert_to_reference.
1308 * cvt.c (convert_to_reference): Assert that reftype is a
1311 2006-04-19 Mark Mitchell <mark@codesourcery.com>
1314 * class.c (currently_open_class): Tidy.
1315 * decl.c (grokdeclarator): If we encounter an erroneous
1316 declarator, assume that we have already issued an error message
1317 and return. Return error_mark_node instead of NULL_TREE in more
1318 places. Issue errors about function definitions that do not have
1319 a function declarator. Check for complete types for all function
1321 * cp-tree.h (cp_error_declarator): Remove.
1322 (currently_open_class): Change return type.
1323 * parser.c (cp_parser_id_expression): Add optional_p parameter.
1324 (cp_parser_parse_diagnose_invalid_type_name): Adjust calls.
1325 (cp_parser_id_expression): Likewise.
1326 (cp_parser_unqualified_id): If the name is optional, return
1328 (cp_parser_postfix_dot_deref_expression): Adjust calls.
1329 (cp_parser_type_parameter): Likewise.
1330 (cp_parser_unqualified_id): Likewise.
1331 (cp_parser_direct_declarator): Likewise.
1332 (cp_parser_declarator_id): Add optional_p parameter.
1333 (cp_parser_function_definition_from_specifiers_and_declarator):
1334 Assume that start_function indicates failure only if it has issued
1336 (cp_parser_omp_var_list_no_open): Adjust calls.
1338 2006-04-17 Janis Johnson <janis187@us.ibm.com>
1340 PR c++/26114, c++/26115
1341 * typeck.c (cxx_mark_addressable): Restore check for extra_warnings.
1342 * class.c (check_field_decls): Ditto.
1344 2006-04-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1346 * init.c (build_offset_ref): Remove superfluous temporary.
1348 2006-04-16 Mark Mitchell <mark@codesourcery.com>
1351 * typeck.c (finish_class_member_access_expr): Robustify
1353 2006-04-15 Kazu Hirata <kazu@codesourcery.com>
1355 * Make-lang.in (cp/pt.o): Depend on vecprim.h.
1356 * pt.c: Include vecprim.h.
1357 (inline_parm_levels): Change the type to VEC(int,heap) *.
1358 (inline_parm_levels_used): Remove.
1359 (maybe_begin_member_template_processing,
1360 maybe_end_member_template_processing): Use VEC instead of
1363 * cp/call.c: Fix comment typos.
1365 2006-04-12 Mark Mitchell <mark@codesourcery.com>
1367 * parser.c (cp_parser_init_declarator): Initialize local variables
1370 2006-04-12 Roger Sayle <roger@eyesopen.com>
1372 * parser.c (cp_parser_init_declarator): Initialise
1373 is_parenthesized_init to false to avoid compiler warning.
1375 2006-04-11 Mark Mitchell <mark@codesourcery.com>
1377 * cp-tree.h (build_operator_new_call): Adjust prototype.
1378 (build_new_method_call): Likewise.
1379 (build_op_delete_call): Likewise.
1380 * init.c (build_raw_new_expr): New function.
1381 (build_new_1): Pass information as parameters, rather than
1382 bundling it into a NEW_EXPR.
1383 (build_new): Adjust accordingly.
1384 (build_vec_delete_1): Adjust for changes to build_op_delete_call.
1385 (build_delete): Likewise.
1386 * decl.c (finish_destructor_body): Likewise.
1387 * call.c (build_operator_new_call): Return the allocation function
1389 (build_op_delete_call): Take allocation function as parameter.
1390 (build_special_member_call): Adjust call to build_new_method_call.
1391 (build_new_method_call): Return function called.
1392 * pt.c (tsubst_copy_and_build): Adjust call to
1393 build_new_method_call.
1394 * semantics.c (finish_call_expr): Likewise.
1395 * parser.c (cp_parser_postfix_expression): Likewise.
1396 * typeck2.c (cxx_incomplete_type_diagnostic): Refer to
1397 "incomplete", not "undefined", types.
1400 * decl.c (grokdeclarator): Remove namespace-handling code for
1401 pointers-to-members.
1402 * parser.c (cp_parser_ptr_operator): Check for qualified names
1406 * parser.c (cp_parser_init_declarator): Adjust logic for deciding
1407 whether or not to look for a pure-specifier.
1408 (cp_parser_member_declaration): Likewise.
1410 2006-04-08 Kazu Hirata <kazu@codesourcery.com>
1412 * decl2.c, pt.c, semantics.c: Fix comment typos.
1414 2006-04-06 Roger Sayle <roger@eyesopen.com>
1416 * call.c (null_ptr_cst_p): Add explicit TREE_CONSTANT_OVERFLOW check.
1418 2006-04-05 Jason Merrill <jason@redhat.com>
1420 * name-lookup.c (push_namespace_with_attribs): Temporarily disable
1421 default hidden visibility for anonymous namespace.
1423 2006-03-29 Roger Sayle <roger@eyesopen.com>
1426 * init.c (build_vec_delete_1): Convert BASE pointer's type to
1427 the base pointer type to avoid a type mismatch in the EQ_EXPR.
1429 2006-03-24 Carlos O'Donell <carlos@codesourcery.com>
1431 * search.c (maybe_suppress_debug_info): If
1432 flag_emit_class_debug_always then don't suppress.
1434 2006-03-22 Jason Merrill <jason@redhat.com>
1436 * name-lookup.c (push_namespace_with_attribs): Only apply hidden
1437 visibility to anonymous namespaces if HAVE_GAS_HIDDEN.
1439 2006-03-21 Jakub Jelinek <jakub@redhat.com>
1442 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle default arguments.
1444 2006-03-21 Jason Merrill <jason@redhat.com>
1447 * parser.c (cp_parser_declaration): Support attributes on
1448 anonymous namespaces.
1449 * name-lookup.c (push_namespace_with_attribs): Anonymous
1450 namespaces default to hidden visibility.
1452 2006-03-20 Jason Merrill <jason@redhat.com>
1454 PR c++/21764, c++/19238
1455 * decl.c (cp_finish_decl): Call determine_visibility later.
1456 (start_preparsed_function): Likewise.
1457 * cp-tree.h (CP_TYPE_CONTEXT, TYPE_NAMESPACE_SCOPE_P): New macros.
1458 (TYPE_CLASS_SCOPE_P, TYPE_FUNCTION_SCOPE_P): New macros.
1459 * name-lookup.h (struct cp_binding_level): Add has_visibility
1461 * name-lookup.c: Include c-pragma.h.
1462 (push_namespace_with_attribs): Split out from push_namespace.
1463 Push visibility if appropriate. Set TREE_PUBLIC on namespaces.
1464 (leave_scope): Pop visibility if appropriate.
1465 * decl2.c (determine_visibility_from_class): Split out from...
1466 (determine_visibility): ...here. Handle function scope and
1468 (import_export_decl): Move visibility handling to
1469 determine_visibility_from_class.
1470 * parser.c (cp_parser_declaration, cp_parser_namespace_name): Allow
1471 attributes on namespace declarations.
1473 2006-03-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1476 * decl.c (grokdeclarator): Do not accept long long double.
1477 Reorganize checks for invalid (combinations of) type modifiers.
1478 Quote modifiers in messages.
1480 2006-03-09 Jason Merrill <jason@redhat.com>
1482 PR c++/16387, c++/16389
1483 * typeck.c (cxx_alignof_expr, cxx_sizeof_expr): New functions.
1484 (cxx_sizeof_or_alignof_expr): Split out from here.
1486 2006-03-09 Diego Novillo <dnovillo@redhat.com>
1488 Merge from gomp-20050608-branch
1490 2006-02-02 Diego Novillo <dnovillo@redhat.com>
1492 * decl.c (pop_labels_1): Use appropriate pointer casting.
1493 (poplevel_named_label_1): Likewise.
1494 (named_label_entry_hash): Likewise.
1495 (named_label_entry_eq): Likewise.
1496 (check_goto): Likewise.
1497 (define_label): Likewise.
1499 2006-01-26 Diego Novillo <dnovillo@redhat.com>
1501 * cp-tree.h (CP_OMP_CLAUSE_INFO): Use TREE_TYPE instead
1503 * pt.c: Use OMP_CLAUSE_CODE and OMP_CLAUSE_OPERAND
1504 instead of TREE_CODE/TREE_OPERAND.
1505 * semantics.c: Likewise.
1506 * parser.c: Likewise.
1508 2005-11-10 Diego Novillo <dnovillo@redhat.com>
1510 * parser.c (cp_parser_omp_threadprivate): Emit diagnostic if
1511 target does not support TLS.
1513 2005-11-09 Jakub Jelinek <jakub@redhat.com>
1515 * decl.c (redeclaration_error_message): Don't error about
1516 DECL_THREAD_LOCAL_P mismatches if CP_DECL_THREADPRIVATE_P
1519 2005-11-08 Jakub Jelinek <jakub@redhat.com>
1522 * semantics.c (finish_omp_barrier, finish_omp_flush): New
1524 * parser.c (cp_parser_omp_barrier): Call finish_omp_barrier.
1525 (cp_parser_omp_flush): Call finish_omp_flush.
1526 * cp-tree.h (finish_omp_barrier, finish_omp_flush): New
1530 * pt.c (tsubst_expr): Handle OMP_MASTER and OMP_ORDERED.
1532 2005-11-03 Jakub Jelinek <jakub@redhat.com>
1534 * semantics.c (finish_omp_threadprivate): Error on class-scope
1537 2005-11-02 Jakub Jelinek <jakub@redhat.com>
1539 * parser.c (cp_parser_omp_all_clauses): If some clause
1540 type is not allowed, don't remove just one of the
1541 clauses, but all clauses added in that loop round.
1543 * semantics.c (finish_omp_clauses): Fix function
1544 comment. Don't handle non-const or mutable specially,
1545 as const and not mutable is predetermined shared and
1546 that leads to double error. Don't ICE if copyin var is
1550 * parser.c (cp_parser_pragma): Diagnose
1551 PRAGMA_OMP_SECTION outside of PRAGMA_OMP_SECTIONS
1554 * semantics.c (finish_omp_threadprivate): Error if V
1555 is automatic variable or has incomplete type.
1557 2005-11-01 Diego Novillo <dnovillo@redhat.com>
1559 * parser.c (cp_parser_omp_all_clauses): Use
1560 OMP_CLAUSE_CHAIN instead of TREE_CHAIN.
1562 2005-11-01 Diego Novillo <dnovillo@redhat.com>
1564 * parser.c (cp_parser_omp_all_clauses): When emitting an
1565 error message, remove the invalid clause from the list.
1567 2005-10-31 Diego Novillo <dnovillo@redhat.com>
1569 * parser.c (cp_parser_omp_parallel): Do not allow 'nowait' in
1570 combined parallel+workshare directives.
1572 2005-10-31 Richard Henderson <rth@redhat.com>
1574 * cp-objcp-common.h (LANG_HOOKS_OMP_CLAUSE_DTOR):
1575 Use cxx_omp_clause_dtor.
1576 * cp-tree.h (CP_OMP_CLAUSE_INFO): New.
1577 (cxx_omp_clause_dtor): New.
1578 * cp-gimplify.c (cxx_omp_clause_apply_fn): New.
1579 (cxx_omp_clause_default_ctor): Use it.
1580 (cxx_omp_clause_copy_ctor, cxx_omp_clause_assign_op):
1582 (cxx_omp_clause_dtor): New.
1583 * semantics.c (finish_omp_clauses): Rewrite cdtor
1584 checking to fill in CP_OMP_CLAUSE_INFO. Don't
1585 specialcase LASTPRIVATE for removal.
1586 (cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor,
1587 cxx_omp_clause_assign_op): Move to cp-gimplify.c.
1589 2005-10-28 Jakub Jelinek <jakub@redhat.com>
1591 * semantics.c (finish_omp_threadprivate): If
1592 DECL_RTL_SET_P, call make_decl_rtl again so that
1593 encode_section_info can update SYMBOL_REF's flags.
1595 2005-10-26 Jakub Jelinek <jakub@redhat.com>
1597 * semantics.c (finish_omp_for): Don't segfault if COND
1598 or INCR is NULL. If not calling c_finish_omp_for
1599 right away and one of COND and INCR is NULL, issue
1600 error and don't expand anything.
1603 * cp-tree.h (finish_omp_for): Add PRE_BODY argument.
1604 * semantics.c (finish_omp_for): Likewise. Set
1605 OMP_FOR_PRE_BODY to PRE_BODY if deferring, add it
1606 into the current statement list if not processing
1607 template decl or pass it to c_finish_omp_for.
1609 * parser.c (cp_parser_omp_for_loop): Expand optional DECL_EXPRs
1610 into PRE_BODY statement list. Pass it to finish_omp_for.
1611 * pt.c (tsubst_expr) <case OMP_FOR>: tsubst_expr also
1612 OMP_FOR_PRE_BODY into PRE_BODY stmt list, pass it to
1613 finish_omp_for. Put all the statements into sk_omp
1616 2005-10-25 Jakub Jelinek <jakub@redhat.com>
1619 * parser.c (struct cp_parser): Rename in_iteration_statement
1620 field to in_statement.
1621 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
1622 (IN_OMP_BLOCK, IN_OMP_FOR): Change values.
1623 (cp_parser_new, cp_parser_begin_omp_structured_block,
1624 cp_parser_end_omp_structured_block,
1625 cp_parser_omp_for_loop): Adjust for
1626 in_iteration_statement renaming.
1627 (cp_parser_selection_statement): Save
1628 parser->in_iteration, or it temporarily with
1629 IN_SWITCH_STMT for the
1630 cp_parser_implicitly_scoped_statement call.
1631 (cp_parser_iteration_statement): Adjust for
1632 in_iteration_statement renaming. Use
1633 IN_ITERATION_STMT rather than true.
1634 (cp_parser_jump_statement): Adjust for
1635 in_iteration_statement renaming and new values. Don't
1636 error on break in a switch statement within OMP_FOR or
1637 OpenMP structured block.
1640 * parser.c (cp_parser_cache_group): Don't stop if next
1641 token is CPP_PRAGMA_EOL and end is CPP_PRAGMA_EOL as
1642 well. If current token is CPP_PRAGMA, consume
1643 everything until CPP_PRAGMA_EOL inclusive.
1645 2005-10-24 Jakub Jelinek <jakub@redhat.com>
1648 * semantics.c (finish_omp_for): Handle MODOP_EXPR in
1649 addition to MODIFY_EXPR.
1651 2005-10-23 Richard Henderson <rth@redhat.com>
1653 * cp-gimplify.c (struct cp_gimplify_ctx): Remove.
1655 (begin_bc_block, finish_bc_block): Use it.
1656 (push_context, pop_context): Remove.
1657 (cp_genericize): Don't use them. Assert bc_label is null.
1658 * semantics.c (finish_omp_clauses): Create a fake data
1659 element of TYPE for probing ctors.
1661 2005-10-23 Richard Henderson <rth@redhat.com>
1663 * cp-objcp-common.h (LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR): New.
1664 (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR): New.
1665 (LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): New.
1666 (LANG_HOOKS_OMP_CLAUSE_DTOR): New.
1667 * semantics.c (finish_omp_clauses): Look through
1668 arrays when looking up special member calls. Also
1669 remove FIRSTPRIVATE when LASTPRIVATE fails.
1670 (cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor): New.
1671 (cxx_omp_clause_assign_op): New.
1672 * cp-tree.h: Declare them.
1674 2005-10-21 Richard Henderson <rth@redhat.com>
1676 * decl.c (check_previous_goto_1): Return false if error.
1677 (check_switch_goto): Likewise.
1678 (finish_case_label): Don't emit the case label on error.
1679 * parser.c (struct cp_parser): Revert
1680 in_switch_statement_p changes.
1681 (cp_parser_labeled_statement,
1682 cp_parser_selection_statement): Likewise.
1683 (cp_parser_begin_omp_structured_block): Don't save...
1684 (cp_parser_end_omp_structured_block): or restore
1685 in_switch_statement_p.
1687 2005-10-21 Richard Henderson <rth@redhat.com>
1689 * semantics.c (finish_omp_threadprivate): Set
1690 decl_flags.u2sel when necessary.
1692 2005-10-21 Richard Henderson <rth@redhat.com>
1694 * decl.c (poplevel_named_label_1): Restore creation of the
1696 (decl_jump_unsafe): Check for error_mark_node types.
1697 (check_goto): Don't check cdtor_label. Don't use identify_goto.
1698 * semantics.c (finish_return_stmt): Do check_omp_return before
1699 converting to cdtor_label goto.
1701 2005-10-21 Richard Henderson <rth@redhat.com>
1704 * decl.c (check_omp_return): Return false on error.
1705 * cp-tree.h (check_omp_return): Update decl.
1706 * semantics.c (finish_return_stmt): Avoid adding
1709 2005-10-21 Richard Henderson <rth@redhat.com>
1711 * cp-tree.h (struct language_function): Remove
1713 Change x_named_labels to a hashtable.
1714 (check_omp_return): Declare.
1715 * decl.c (struct named_label_use_entry): Rename from
1716 named_label_use_list. Remove label_decl.
1717 (struct named_label_entry): Rename from
1718 named_label_list. Remove old_value and next. Change
1719 in_try_scope and in_catch_scope to bool. Add
1721 (pop_labels_1): New.
1722 (pop_labels): Use it.
1723 (pop_local_label, poplevel_named_label_1): New.
1724 (poplevel): Use them.
1725 (named_label_entry_hash, named_label_entry_eq): New.
1726 (make_label_decl): Create named_labels. Move label
1727 creation bits from lookup_label.
1728 (declare_local_label): Tidy.
1729 (identify_goto): Split out from ...
1730 (check_previous_goto_1): Add exited_omp argument.
1733 (use_label): Merge into...
1734 (check_goto): ... here. Handle omp scopes.
1735 (check_omp_return): New.
1736 (check_previous_gotos): Merge into...
1737 (define_label): ... here.
1738 (save_function_data): Remove x_named_label_uses reference.
1739 (finish_function): Likewise.
1740 * name-lookup.h (sk_omp): New.
1741 * name-lookup.c (begin_scope): Handle it.
1742 * parser.c (cp_parser_omp_for): Don't create extra
1745 (cp_parser_omp_sections): Likewise.
1746 * semantics.c (finish_return_stmt): Call check_omp_return.
1747 (begin_omp_structured_block): Use sk_omp.
1748 (finish_omp_structured_block): Use do_poplevel. Don't build a
1749 MUST_NOT_THROW expression here.
1750 (begin_omp_parallel, finish_omp_parallel): Don't create extra
1751 compound statements.
1753 2005-10-21 Diego Novillo <dnovillo@redhat.com>
1756 * cp/cp-tree.h (struct lang_decl_flags): Add field
1758 (CP_DECL_IS_THREADPRIVATE): Define.
1759 * cp/semantics.c (finish_omp_threadprivate): Set. Do
1760 not error out if CP_DECL_IS_THREADPRIVATE is set
1762 * cp/decl.c (duplicate_decls): Merge
1763 CP_DECL_THREADPRIVATE_P.
1765 2005-10-20 Richard Henderson <rth@redhat.com>
1767 * cp-gimplify.c (cp_gimplify_omp_for): New.
1768 (cp_gimplify_expr): Call it.
1769 * cp-tree.h (OMP_FOR_GIMPLIFYING_P): New.
1770 * parser.c (struct cp_parser): Rename
1771 in_iteration_statement_p to in_iteration_statement and
1772 change to unsigned char. Similarly with
1773 in_switch_statement. Update all users.
1774 (IN_OMP_BLOCK, IN_OMP_FOR): New.
1775 (cp_parser_labeled_statement): Diagnose case labels
1776 binding closer to an openmp block nested than the
1778 (cp_parser_jump_statement): Diagnose break and
1779 continue labels binding closer to an openmp block than
1780 an iteration or switch.
1781 (cp_parser_omp_for_loop): Mark in_iteration_statement
1783 (cp_parser_begin_omp_structured_block): New.
1784 (cp_parser_end_omp_structured_block): New.
1785 (cp_parser_omp_structured_block): Use them.
1786 (cp_parser_omp_for, cp_parser_omp_sections_scope): Likewise.
1787 (cp_parser_omp_parallel): Likewise.
1789 2005-10-20 Richard Henderson <rth@redhat.com>
1791 * semantics.c (begin_omp_structured_block): New.
1792 (finish_omp_structured_block): New.
1793 (begin_omp_parallel, finish_omp_parallel): Use them.
1794 * parser.c (cp_parser_omp_structured_block): Likewise.
1795 (cp_parser_omp_for): Likewise.
1796 (cp_parser_omp_sections_scope): Likewise.
1797 * cp-tree.h: Declare them.
1799 2005-10-20 Richard Henderson <rth@redhat.com>
1801 * parser.c (cp_parser_omp_master): Return the statement.
1802 (cp_parser_omp_ordered): Likewise.
1803 (cp_parser_omp_construct): Set the locus for them.
1805 2005-10-19 Richard Henderson <rth@redhat.com>
1807 * semantics.c (finish_omp_atomic): Revert to
1808 uses_template_parms.
1810 2005-10-19 Richard Henderson <rth@redhat.com>
1812 * semantics.c (finish_omp_clauses): Avoid
1813 DECL_THREAD_LOCAL_P on a PARM_DECL. Remove some
1814 stub asserts guaranteed to fail.
1816 2005-10-19 Richard Henderson <rth@redhat.com>
1818 * cp-tree.h (OMP_ATOMIC_DEPENDENT_P, OMP_ATOMIC_CODE): New.
1819 (finish_omp_clauses, finish_omp_for, finish_omp_atomic): New.
1820 * parser.c (cp_parser_omp_clause_copyin): Remove.
1821 (cp_parser_omp_all_clauses): Use cp_parser_omp_var_list instead.
1822 Call finish_omp_clauses.
1823 (cp_parser_omp_clause_if): Don't do error checking here.
1824 (cp_parser_omp_clause_num_threads): Likewise.
1825 (cp_parser_omp_clause_schedule): Likewise.
1826 (cp_parser_omp_atomic): Use finish_omp_atomic.
1827 (cp_parser_omp_for_loop): Don't discard DECL_EXPR.
1828 Don't decompose assignment statment here. Use
1831 * pt.c (tsubst_omp_clauses): New.
1832 (tsubst_expr): Handle OMP_PARALLEL, OMP_FOR, OMP_SECTIONS,
1833 OMP_SINGLE, OMP_SECTION, OMP_CRITICAL, OMP_ATOMIC.
1834 * semantics.c (finish_omp_clauses): New.
1835 (begin_omp_parallel, finish_omp_parallel): Know Less about the
1836 internals of the stmt_list stack.
1837 (finish_omp_for, finish_omp_atomic): New.
1839 2005-10-18 Jakub Jelinek <jakub@redhat.com>
1841 * semantics.c (cxx_omp_predetermined_sharing): New function.
1842 * cp-tree.h (cxx_omp_predetermined_sharing): New prototype.
1844 (LANG_HOOKS_OMP_PREDETERMINED_SHARING): Redefine.
1846 2005-10-18 Richard Henderson <rth@redhat.com>
1848 * parser.c (cp_parser_omp_single): Use make_node and accessors
1851 2005-10-17 Richard Henderson <rth@redhat.com>
1853 * parser.c (cp_parser_omp_for_loop): Handle declarations.
1855 2005-10-12 Richard Henderson <rth@redhat.com>
1857 * Make-lang.in (CXX_C_OBJS): Add c-omp.o.
1858 * cp-tree.h (begin_omp_parallel, finish_omp_parallel): Declare.
1859 (finish_omp_threadprivate): Declare.
1860 * parser.c (struct cp_lexer): Add in_pragma.
1861 (cp_lexer_consume_token): Don't consume a PRAGMA_EOL
1863 (cp_parser_skip_to_closing_parenthesis): Stop at PRAGMA_EOL.
1864 (cp_parser_skip_to_end_of_statement): Likewise.
1865 (cp_parser_skip_to_end_of_block_or_statement): Likewise.
1866 (cp_parser_skip_to_closing_brace): Likewise.
1867 (cp_parser_skip_to_pragma_eol): Reset in_pragma.
1868 (cp_parser_require_pragma_eol): New.
1869 (cp_parser_statement): Add in_compound argument;
1871 Restart if a non-statement pragma seen outside a
1873 (cp_parser_statement_seq_opt): Stop at PRAGMA_EOL.
1874 (cp_parser_declaration_seq_opt): Likewise.
1875 (cp_parser_member_specification_opt): Likewise.
1876 (cp_parser_function_definition_after_decl): Likewise.
1877 (cp_parser_skip_until_found): Likewise.
1878 (cp_parser_cache_group): Likewise.
1879 (enum pragma_omp_clause, cp_parser_omp_clause_name,
1880 check_no_duplicate_clause,
1881 cp_parser_omp_var_list_no_open,
1882 cp_parser_omp_var_list, cp_parser_omp_clause_copyin,
1883 cp_parser_omp_clause_default, cp_parser_omp_clause_if,
1884 cp_parser_omp_clause_nowait,
1885 cp_parser_omp_clause_num_threads,
1886 cp_parser_omp_clause_ordered,
1887 cp_parser_omp_clause_reduction,
1888 cp_parser_omp_clause_schedule,
1889 cp_parser_omp_all_clauses,
1890 cp_parser_omp_structured_block, cp_parser_omp_atomic,
1891 cp_parser_omp_barrier, cp_parser_omp_critical,
1892 cp_parser_omp_flush, cp_parser_omp_for_loop,
1893 cp_parser_omp_for, cp_parser_omp_master,
1894 cp_parser_omp_ordered, cp_parser_omp_sections_scope,
1895 cp_parser_omp_sections, cp_parser_omp_parallel,
1896 cp_parser_omp_single, cp_parser_omp_threadprivate,
1897 cp_parser_omp_construct): New.
1898 (cp_parser_pragma): Handle OpenMP pragmas.
1899 * semantics.c (finish_omp_threadprivate): New.
1900 (begin_omp_parallel, finish_omp_parallel): New.
1902 2005-10-11 Richard Henderson <rth@redhat.com>
1904 * parser.c (struct cp_token): Add pragma_kind.
1905 (eof_token): Initialize it.
1906 (cp_lexer_handle_pragma): Remove.
1907 (cp_parser_initial_pragma): New.
1908 (cp_lexer_new_main): Use it.
1909 (cp_lexer_get_preprocessor_token): Initialize pragma_kind.
1910 (cp_lexer_print_token): Don't handle CPP_PRAGMA.
1911 (cp_parser_skip_to_pragma_eol): New.
1912 (cp_parser_error): Use it.
1915 2005-10-09 Richard Henderson <rth@redhat.com>
1917 * lex.c (parse_strconst_pragma): Update for c_lex name change.
1918 (handle_pragma_java_exceptions): Likewise.
1919 * parser.c (cp_lexer_new_main): Likewise.
1921 2005-10-06 Richard Henderson <rth@redhat.com>
1923 * parser.c (cp_lexer_new_main): Comment out defer_pragmas.
1924 (cp_lexer_handle_pragma): Comment out
1925 cpp_handle_deferred_pragma.
1927 2005-10-01 Richard Henderson <rth@redhat.com>
1929 * name-lookup.c (lookup_name): Remove prefer_type argument.
1930 (lookup_name_prefer_type): New function.
1931 * name-lookup.h (lookup_name_prefer_type): Declare it.
1932 * decl.c (lookup_and_check_tag): Use it.
1933 * pt.c (tsubst_friend_class): Likewise. Update for
1935 (lookup_template_class, tsubst_copy_and_build): Likewise.
1937 2006-03-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1940 * tree.c (bot_manip): Don't call mark_used.
1942 2006-03-02 Mike Stump <mrs@apple.com>
1944 * decl2.c (import_export_decl): Remove redundant call to
1945 targetm.cxx.key_method_may_be_inline ().
1947 2006-03-02 Richard Sandiford <richard@codesourcery.com>
1949 * decl.c (start_decl): Use have_global_bss_p when deciding
1950 whether to make the decl common.
1952 2006-03-01 Mike Stump <mrs@apple.com>
1955 * decl2.c (import_export_decl): Fix ABI breakage on darwin.
1957 2006-02-24 Geoffrey Keating <geoffk@apple.com>
1959 * except.c (expand_start_catch_block): Handle
1960 flag_use_cxa_get_exception_ptr.
1962 2006-02-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1965 * decl.c (grok_op_properties): Check for ellipsis in arguments of
1968 2006-02-20 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
1970 * Make-lang.in (C++): Remove.
1971 (.PHONY): Remove C++.
1973 2006-02-18 Mark Mitchell <mark@codesourcery.com>
1976 * cp-tree.h (cp_finish_decl): Adjust declaration.
1977 (grokbitfield): Likewise.
1978 (finish_static_data_member_decl): Likewise.
1979 * init.c (constant_value_1): Ensure processing_template_decl when
1980 folding non-dependent initializers for static data members of
1981 dependent types. Return error_mark_node for erroneous
1983 * class.c (get_vtable_decl): Use finish_decl, not cp_finish_decl.
1984 * decl.c (cp_make_fname_decl): Adjust call to cp_finish_decl.
1985 (cp_finish_decl): Add init_const_expr_p parameter. Set
1986 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here.
1987 (finish_decl): Adjust call to cp_finish_decl.
1988 (compute_array_index_type): Robustify.
1989 (start_method): Use finish_decl, not cp_finish_decl.
1990 * rtti.c (emit_tinfo_decl): Likewise.
1991 * except.c (initialize_handler_parm): Adjust call to
1993 (expand_start_catch_block): Likewise.
1994 * cvt.c (build_up_reference): Adjust call to cp_finish_decl.
1995 * pt.c (instantiate_class_template): Adjust call to
1996 finish_static_data_member_decl.
1997 (tsubst_expr): Use finish_decl, not cp_finish_decl.
1998 (instantiate_decl): Adjust call to cp_finish_decl.
1999 * name-lookup.c (pushdecl_top_level_1): Use finish_decl, not
2001 * decl2.c (finish_static_data_member_decl): Add init_const_expr_p
2003 (grokfield): Likewise.
2004 * parser.c (cp_parser_condition): Check for constant initializers.
2005 (cp_parser_init_declarator): Adjust calls to grokfield and
2006 cp_finish_decl. Don't set
2007 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here.
2008 (cp_parser_member_declaration): Likewise.
2009 (cp_parser_objc_class_ivars): Likewise.
2011 2006-02-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2013 * call.c (standard_conversion): Return NULL instead of 0.
2014 (build_user_type_conversion_1): Likewise.
2015 (tourney): Likewise.
2016 * decl.c (redeclaration_error_message): Likewise.
2017 * error.c (language_to_string): Likewise.
2019 2006-02-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2021 * cp-tree.h (warn_hidden): Remove prototype.
2022 * class.c (warn_hidden): Make static.
2024 * cp-tree.h (build_type_conversion): Remove prototype.
2025 * cvt.c (build_type_conversion): Add prototype, make static.
2027 * cp-tree.h (push_tinst_level): Remove prototype.
2028 (pop_tinst_level): Likewise.
2029 * pt.c (push_tinst_level): Add prototype, make static.
2030 (pop_tinst_level): Likewise.
2032 2006-02-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2034 * decl.c (grokdeclarator): Return NULL_TREE instead of 0.
2035 * typeck.c (unary_complex_lvalue): Likewise.
2037 2006-02-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2039 * lex.c (parse_strconst_pragma): Return error_mark_node instead of
2040 "(tree)-1" to indicate failure. Simplify.
2041 (handle_pragma_interface): Test for error_mark_node instead of
2043 (handle_pragma_implementation): Likewise.
2045 2006-02-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2048 * parser.c (cp_parser_decl_specifier_seq): Check for duplicate
2049 decl-specifiers. Remove extra check for duplicate 'friend'.
2050 * decl.c (grokdeclarator): Remove check for duplicate
2051 decl-specifiers. Set longlong together with long_p.
2053 2006-02-12 Jason Merrill <jason@redhat.com>
2056 * except.c (build_throw): Add a CLEANUP_POINT_EXPR inside the
2057 TRY_CATCH_EXPR or MUST_NOT_THROW_EXPR.
2059 2006-02-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2061 * class.c (debug_class): Remove extern.
2062 (debug_thunks): Likewise.
2064 2006-02-09 Gabriel Dos Reis <gdr@integrable-solutions.net>
2066 * typeck.c (string_conv_p): Don't test for flag_const_strings.
2068 2006-02-08 Jason Merrill <jason@redhat.com>
2071 * cp-gimplify.c (cp_gimplify_expr): Don't call
2072 cp_gimplify_init_expr for MODIFY_EXPRs.
2073 * typeck2.c (split_nonconstant_init_1): Use INIT_EXPR.
2075 2006-02-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2078 * decl.c (grokdeclarator): Set dname also for destructor.
2081 * decl.c (grokdeclarator): Clear storage_class together with staticp.
2083 2006-02-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
2085 * cp-tree.h (tf_warning_or_error): Renamed from tf_warn_or_error.
2086 (cp_build_qualified_type): Propogate renaming.
2087 * call.c (convert_like_real): Likewise.
2088 * cvt.c (cp_convert_to_pointer, convert_to_reference): Likewise.
2089 * decl.c (make_typename_type, grokdeclarator): Likewise.
2090 * pt.c (tsubst_friend_function, instantiate_class_template,
2091 tsubst_default_argument, instantiate_decl,
2092 tsubst_initializer_list, tsubst_enum): Likewise.
2093 * semantics.c (finish_template_type): Likewise.
2094 * typeck.c (build_ptrmemfunc, convert_for_assignment): Likewise.
2096 2006-02-07 Dirk Mueller <dmueller@suse.com>
2098 * typeck.c (build_binary_op): Annotate div-by-zero
2099 warnings to make -Wno-div-by-zero have an effect.
2101 2006-02-07 Mark Mitchell <mark@codesourcery.com>
2104 * pt.c (coerce_template_template_parms): Do not templates with
2105 excess default arguments to match template template parameters
2106 with fewer parameters.
2107 (coerce_template_parms): Add use_default_args parameter; use
2108 default arguments only when true.
2109 (lookup_template_class): Adjust call to coerce_template_parms.
2110 (fn_type_unification): Likewise.
2112 (get_bindings): Likewise.
2113 (dependent_type_p): Add assertions.
2115 2006-02-06 Roger Sayle <roger@eyesopen.com>
2117 * decl.c (grokdeclarator): Don't bother checking for CHAR_TYPE.
2118 * rtti.c (typeinfo_in_lib_p): Likewise.
2119 * cp-tree.h (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P): Likewise.
2120 * name-lookup.c (arg_assoc_type): Likewise.
2122 2006-02-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2124 * cp-tree.h (tf_warn_or_error): New substituion flag.
2125 (cp_build_qualified_type): Use it.
2126 * call.c (convert_like_real): Likewise.
2127 * cvt.c (cp_convert_to_pointer): Likewise.
2128 (convert_to_reference): Likewise.
2129 * decl.c (make_typename_type): Likewise.
2130 (grokdeclarator): Likewise.
2131 * pt.c (tsubst_friend_function): Likewise.
2132 (tsubst_friend_class): Likewise.
2133 (instantiate_class_template): Likewise.
2134 (tsubst_default_argument): Likewise.
2135 (instantiate_decl): Likewise.
2136 (tsubst_initializer_list): Likewise.
2137 (tsubst_enum): Likewise.
2138 * semantics.c (finish_template_type): Likewise.
2139 * typeck.c (build_ptrmemfunc): Likewise.
2140 (convert_for_assignment): Likewise.
2142 2006-02-03 Lee Millward <lee.millward@gmail.com>
2144 * typeck.c (string_conv_p): Pass appropiate
2145 OPT_Wxxxx values when calling warning().
2146 (build_array_ref, cxx_mark_addressable): Likewise.
2147 (check_return_expr): Likewise.
2149 * init.c (perform_member_init): Likewise.
2150 (sort_mem_initializers, emit_mem_initializers): Likewise.
2152 * class.c (check_field_decls): Likewise.
2153 (warn_about_ambiguous_bases): Likewise.
2155 * decl.c (pop_label, poplevel): Likewise.
2156 (duplicate_decls, grok_op_properties): Likewise.
2157 (start_preparsed_function, finish_function): Likewise.
2159 * name-lookup.c (pushdecl_maybe_friend): Likewise.
2160 (pushdecl_maybe_friend): Likewise.
2162 * parser.c (cp_parser_warn_min_max): Likewise.
2163 (cp_parser_cast_expression): Likewise.
2165 * method.c (lazily_declare_fn): Likewise.
2166 * cvt.c (convert_to_void): Likewise.
2167 * mangle.c (finish_mangling): Likewise.
2168 * cp-gimplify.c (gimplify_expr_stmt): Likewise.
2170 2006-02-03 Mark Mitchell <mark@codesourcery.com>
2172 * name-lookup.c (do_class_using_decl): Use IDENTIFIER_TYPENAME_P,
2173 not IDENTIFIER_OPNAME_P.
2175 2006-01-31 Mark Mitchell <mark@codesourcery.com>
2178 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Revise
2180 * pt.c (determine_specialization): Use INNERMOST_TEMPLATE_PARMS,
2182 (instantiate_class_template): Simplify.
2183 (verify_class_unification): Remove.
2184 (unify): Document parameters. Use INNERMOST_TEMPLATE_ARGS to
2185 permit multiple levels of template arguments.
2186 (more_specialized_class): Simplify.
2187 (get_class_bindings): Pass full arguments to unify. Fold
2188 verify_class_unification into this function. Return full
2190 (most_specialized_class): Adjust for changes to
2191 get_class_bindings. Issue errors here for ambiguity. Return the
2192 fully deduced arguments for the most specialized class, in
2193 addition to the partial specialization.
2195 2006-01-31 Ben Elliston <bje@au.ibm.com>
2197 * mangle.c: Comment fix.
2199 2006-01-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
2201 * Make-lang.in (cp-warn): Include CXX_COMPAT_WARN.
2202 * repo.c (extract_string, afgets): Use cast when converting from
2205 2006-01-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
2207 * call.c (alloc_conversion): Use cast when converting from void *.
2208 (alloc_conversions): Likewise.
2209 (add_candidate): Likewise.
2210 (print_z_candidates): Likewise.
2211 (add_warning): Likewise.
2212 * pt.c (retrieve_local_specialization): Likewise.
2213 (process_partial_specialization): Likewise.
2214 (mangle_class_name_for_template): Likewise.
2215 (tsubst_template_args): Likewise.
2216 * typeck2.c (pat_calc_hash): Likewise.
2217 (pat_compare): Likewise.
2218 (abstract_virtuals_error): Likewise.
2219 * class.c (method_name_cmp): Likewise.
2220 (resort_method_name_cmp): Likewise.
2221 (get_vfield_name): Likewise.
2222 * decl2.c (generate_ctor_and_dtor_functions_for_priority): Likewise.
2223 * lex.c (init_reswords): Likewise.
2224 * rtti.c (create_pseudo_type_info): Likewise.
2225 * search.c (dfs_lookup_base): Likewise.
2226 (dfs_dcast_hint_pre): Likewise.
2227 (dfs_dcast_hint_post): Likewise.
2228 * tree.c (hash_tree_cons): Likewise.
2229 * repo.c (extract_string): Likewise.
2231 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Likewise.
2232 * g++spec.c (lang_specific_driver): Likewise.
2234 2006-01-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
2236 * call.c (joust): Pass option code to warning. Use inform for
2238 * class.c (check_bases): Likewise.
2239 (maybe_warn_about_overly_private_class): Likewise.
2240 (check_field_decls): Likewise.
2241 (layout_empty_base): Likewise.
2242 (layout_virtual_bases): Likewise.
2243 (layout_class_type): Likewise.
2245 2006-01-28 Mark Mitchell <mark@codesourcery.com>
2248 * decl.c (start_preparsed_function): Call maybe_apply_pragma_weak
2250 (start_function): ... here.
2252 2006-01-28 Mark Mitchell <mark@codesourcery.com>
2255 * class.c (resolve_address_of_overloaded_function): Adjust use of
2256 return value from most_specialized_instantiation.
2257 * pt.c (determine_specialization): Avoid multiple calls to
2259 (most_specialized_instantiation): When a tie occurs, set the
2260 current presumed champion to the next template. Return the
2261 TREE_LIST node containing the template, rather than the template
2263 (most_specialized): Remove.
2264 * name-lookup.c (push_overloaded_decl): When duplicate_decls
2265 indicates a failed redeclaration, report that to callers.
2267 2006-01-26 Jason Merrill <jason@redhat.com>
2270 * name-lookup.c (parse_using_directive): Require strong using to
2271 name a nested namespace.
2273 2006-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2276 * cp-tree.h (do_poplevel): Remove prototype.
2277 * semantics.c (do_poplevel): Add prototype. Make static.
2280 * cp-tree.h (default_conversion): Remove prototype.
2281 * typeck.c (default_conversion): Make static.
2283 2006-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2285 * cp-tree.h (get_primary_binfo): Remove prototype.
2286 (push_using_decl): Likewise.
2287 (current_template_args): Likewise.
2288 (more_specialized_class): Likewise.
2289 (mark_class_instantiated): Likewise.
2290 (default_conversion): Likewise.
2291 (pfn_from_ptrmemfunc): Likewise.
2292 * class.c (get_primary_binfo): Add prototype, make static, simplify.
2293 * name-lookup.c (push_using_decl): Make static.
2294 * pt.c (current_template_args): Likewise.
2295 (more_specialized_class): Likewise.
2296 (mark_class_instantiated): Likewise.
2297 * typeck.c (default_conversion): Make static.
2298 (pfn_from_ptrmemfunc): Add prototype, make static.
2300 2006-01-24 Dirk Mueller <dmueller@suse.de>
2302 * typeck.c (build_binary_op): Use OPT_Wfloat_equal in warning().
2304 2006-01-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2307 * parser.c (cp_parser_unqualified_id): Check that destructor name
2309 * call.c (check_dtor_name): Do not expect a BIT_NOT_EXPR.
2310 Adjust comment. Return early if possible.
2311 Use same_type_p to compare types.
2312 * typeck.c (lookup_destructor): Adjust call to check_dtor_name.
2314 2006-01-24 Mark Mitchell <mark@codesourcery.com>
2316 * semantics.c: Remove outdated comment.
2318 2006-01-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2320 * cp-tree.h (do_poplevel): Remove prototype.
2321 * semantics.c (do_poplevel): Add prototype. Make static.
2323 * cp-tree.h (original_type): Remove prototype.
2324 * typeck.c (original_type): Make static.
2326 * cp-tree.h (declare_global_var): Remove prototype.
2327 * decl.c (declare_global_var): Make static.
2329 * cp-tree.h (implicitly_declare_fn): Remove prototype.
2330 * method.c (implicitly_declare_fn): Make static.
2332 * cp-tree.h (fold_decl_constant_value): Remove prototype.
2333 * pt.c (fold_decl_constant_value): Make static.
2335 * cp-tree.h (build_x_delete): Remove prototype.
2336 * init.c (build_vec_delete_1): Call build_op_delete_call directly
2337 and not via build_x_delete.
2338 (build_x_delete): Remove.
2340 * cp-tree.h (get_vtt_name): Remove prototype.
2341 * class.c (get_vtt_name): Remove.
2342 (build_vtt): Call mangle_vtt_for_type instead of get_vtt_name.
2344 2006-01-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2346 * rtti.c (build_dynamic_cast): Fix comment.
2348 2006-01-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2351 * rtti.c (build_dynamic_cast): Reject dynamic_cast use if
2354 2006-01-21 Mark Mitchell <mark@codesourcery.com>
2357 * class.c (build_base_path): Generate a NOP_EXPR instead of a
2358 COMPONENT_REF if the base and derived classes are at the same
2362 * decl.c (begin_destructor_body): Robustify.
2365 * parser.c (cp_parser_direct_declarator): Robustify.
2367 2006-01-20 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2369 * parser.c (cp_lexer_next_token_is_keyword): Simplify.
2371 * parser.c (clear_decl_specs): Remove prototype.
2373 * parser.c (cp_parser_expression_fn): Remove.
2375 * call.c (add_builtin_candidates): Remove superfluous return.
2376 * name-lookup.c (do_toplevel_using_decl): Likewise.
2377 * parser.c (cp_parser_type_specifier_seq): Likewise.
2378 (cp_parser_save_default_args): Likewise.
2380 2006-01-20 Dirk Mueller <dmueller@suse.com>
2383 * semantics.c (finish_if_stmt): Call empty_body_warning.
2384 * parser.c (cp_parser_implicitly_scoped_statement):
2385 Mark empty statement with an empty stmt.
2387 2006-01-19 Mark Mitchell <mark@codesourcery.com>
2390 * name-lookup.c (do_class_using_decl): Don't try to look up base
2391 classes in templates with dependent base types.
2393 2006-01-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2396 * pt.c (maybe_process_partial_specialization): Return early on
2399 2006-01-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2402 * decl.c (start_preparsed_function): Check default arguments
2404 * name-lookup.c (pushdecl_maybe_friend): Check default arguments
2405 of all functions and function templates.
2406 * parser.c (cp_parser_late_parsing_default_args): Check default
2408 * decl2.c (check_default_args): Set missing default arguments to
2411 2006-01-18 Mark Mitchell <mark@codesourcery.com>
2414 * cp-tree.h (push_class_stack): New function.
2415 (pop_class_stack): Likewise.
2416 * class.c (class_stack_node): Add hidden field.
2417 (pushclass): Clear it.
2418 (push_class_stack): New function.
2419 (pop_class_stack): Likewise.
2420 (currently_open_class): Ignore hidden classes.
2421 (currently_open_derived_class): Likewise.
2422 * name-lookup.c (push_to_top_level): Call push_class_stack.
2423 (pop_from_top_level): Call pop_class_stack.
2425 2006-01-18 Kazu Hirata <kazu@codesourcery.com>
2427 * tree.c (find_tree_t, find_tree): Remove.
2428 * cp-tree.h: Remove the prototype for find_tree.
2430 2006-01-18 Jakub Jelinek <jakub@redhat.com>
2432 * search.c (lookup_conversions_r): Fix a pasto.
2434 2006-01-17 Eric Christopher <echristo@apple.com>
2436 * call.c (convert_like_real): When issuing conversion
2437 warnings, depend on OPT_Wconversion.
2438 * cvt.c (build_expr_type_conversion): Ditto.
2440 2006-01-17 Kazu Hirata <kazu@codesourcery.com>
2442 * name-lookup.c (lookup_namespace_name): Remove.
2443 * name-lookup.h: Remove the prototype for
2444 lookup_namespace_name.
2446 2006-01-17 Jakub Jelinek <jakub@redhat.com>
2449 * decl.c (compute_array_index_type): After issuing not an integral
2450 constant-expression error, set size to 1 to avoid ICEs later on.
2452 2006-01-16 Ian Lance Taylor <ian@airs.com>
2454 * parser.c: Include "cgraph.h".
2455 (cp_parser_asm_definition): Call cgraph_add_asm_node rather than
2458 2006-01-16 Rafael �ila de Esp�dola <rafael.espindola@gmail.com>
2460 * g++spec.c (lang_specific_spec_functions): Remove.
2462 2006-01-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
2464 * decl.c (check_initializer): Fix thinko.
2466 2006-01-14 Mark Mitchell <mark@codesourcery.com>
2469 * parser.c (cp_parser_direct_declarator): Use cp_parser_error
2472 2006-01-13 Jason Merrill <jason@redhat.com>
2474 * pt.c (check_explicit_specialization): Use CP_DECL_CONTEXT even more.
2476 * name-lookup.c (set_decl_namespace): Use CP_DECL_CONTEXT.
2477 * pt.c (check_explicit_specialization): Likewise.
2479 2006-01-12 Jason Merrill <jason@redhat.com>
2482 * pt.c (check_explicit_specialization): Handle namespace
2484 * name-lookup.c (set_decl_namespace): Likewise.
2486 2006-01-12 Nathan Sidwell <nathan@codesourcery.com>
2489 * class.c (handle_using_decl): Pass correct scope to
2490 cp_emit_debug_info_for_using.
2492 2006-01-11 Nathan Sidwell <nathan@codesourcery.com>
2495 * tree.c (lvalue_p_1): Any part of a COMPONENT_REF affects
2498 2006-01-06 Gabriel Dos Reis <gdr@integrablesolutions.net>
2500 * parser.c (cp_parser_primary_expression): Document the grammar
2501 for the built-in offsetof, a GNU extension.
2503 2006-01-04 Zdenek Dvorak <dvorakz@suse.cz>
2506 * init.c (constant_value_1): Unshare use of DECL_INITIAL. Fix a typo
2509 2006-01-04 Chris Lattner <sabre@gnu.org>
2511 * typeck2.c: update copyright to 2006
2512 (split_nonconstant_init_1): Set TREE_CONSTANT to true.
2514 2006-01-04 Mark Mitchell <mark@codesourcery.com>
2517 * parser.c (cp_parser_nested_name_specifier_opt): Preserve access
2518 checks, even when parsing tentatively.
2520 2006-01-04 Richard Henderson <rth@redhat.com>
2522 Merge from gomp branch.
2523 * lex.c (handle_pragma_java_exceptions): Fix whitespace.
2524 * parser.c (struct cp_token): Add pragma_kind.
2525 (eof_token): Update to match.
2526 (struct cp_lexer): Add in_pragma; rearrange next for better packing.
2527 (cp_parser_initial_pragma): New.
2528 (cp_lexer_new_main): Use it. Don't bother clearing
2529 c_lex_return_raw_strings.
2530 (cp_lexer_get_preprocessor_token): Always initialize keyword
2531 and pragma_kind fields. Handle CPP_PRAGMA.
2532 (cp_lexer_consume_token): Don't allow CPP_PRAGMA_EOL when
2534 (cp_lexer_handle_pragma): Remove. Update callers to cp_parser_pragma.
2535 (cp_lexer_print_token) <CPP_PRAGMA>: Don't print as a string.
2536 (cp_parser_skip_to_pragma_eol): New.
2537 (cp_parser_error): Use it.
2538 (cp_parser_skip_to_closing_parenthesis): Stop at CPP_PRAGMA_EOL;
2539 rearrange with switch statement.
2540 (cp_parser_skip_to_end_of_statement): Likewise.
2541 (cp_parser_skip_to_end_of_block_or_statement): Likewise.
2542 (cp_parser_skip_to_closing_brace): Likewise.
2543 (cp_parser_skip_until_found): Likewise.
2544 (cp_parser_statement): Add in_compound argument; update callers.
2545 Use it to decide how to handle pragma parsing.
2546 (cp_parser_labeled_statement): Add in_compound argument; pass
2547 it on to cp_parser_statement.
2548 (cp_parser_statement_seq_opt): Stop at CPP_PRAGMA_EOL.
2549 (cp_parser_declaration_seq_opt): Likewise.
2550 (cp_parser_parameter_declaration): Likewise.
2551 (cp_parser_member_specification_opt): Likewise.
2552 (cp_parser_function_definition_after_decl): Likewise.
2553 (cp_parser_cache_group): Handle CPP_PRAGMA/CPP_PRAGMA_EOL pairs.
2554 (cp_parser_pragma): New.
2557 2006-01-04 Dirk Mueller <dmueller@suse.com>
2559 * decl.c (finish_constructor_body): create simple
2560 compound stmt instead of a if(1) { } construct.
2562 2006-01-03 Mark Mitchell <mark@codesourcery.com>
2565 * name-lookup.c (push_class_level_binding): When a derived class
2566 provides a type binding, eliminate any type binding from a base
2570 * repo.c (repo_emit_p): Always instantiate static data members
2571 initialized by constant expressions, so that there values are
2574 2006-01-02 Mark Mitchell <mark@codesourcery.com>
2577 * class.c (add_method): Set TYPE_HAS_CONVERSION for classes with a
2578 conversion operator.
2579 * decl.c (grokdeclarator): Do not set TYPE_HAS_CONVERSION here.
2582 * class.c (add_method): Never associate more than one destructor
2583 with a single class.
2586 * cp-tree.h (do_friend): Adjust prototype.
2587 * decl.c (grokfndecl): Make funcdef_flag a bool, not an int.
2588 (grokdeclarator): Likewise. Refine check for invalid
2589 declarations/definitions of member functions outside of their own
2591 * friend.c (do_friend): Make funcdef_flag a bool, not an int.
2594 * parser.c (cp_parser_mem_initializer_list): Check result of
2595 cp_parser_mem_initializer against error_mark_node, not NULL_TREE.
2596 (cp_parser_mem_initializer): Return error_mark_node for failure.
2599 * parser.c (cp_parser_template_parameter_list): Call
2600 begin_template_parm_list and end_template_parm_list here.
2601 (cp_parser_type_parameter): Not here.
2602 (cp_parser_template_declaration_after_export): Or here.
2603 (cp_parser_elaborated_type_specifier): Call
2604 cp_parser_check_template_parameters.
2606 * tree.c (build_target_expr_with_type): Use force_target_expr.
2608 * decl2.c (mark_used): Fix typo in comment.
2610 2006-01-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2612 * parser.c (cp_parser_using_declaration): Skip name-lookup on
2615 2005-12-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
2617 * cxx-pretty-print.c (pp_cxx_constant): New. Print
2618 string-literal in parens if input program says so.
2619 (pp_cxx_primary_expression): Hand off constant printing to
2621 (pp_cxx_pretty_printer_init): Set pp->c_base.constant.
2622 (pp_cxx_expression): Use pp_cxx_constant for literals.
2623 * error.c (dump_expr): Use pp_constant for literals.
2625 2005-12-29 Nathan Sidwell <nathan@codesourcery.com>
2627 * method.c (make_thunk): Don't set comdat_linkage here.
2628 (use_thunk): Make thunk one only here, if thunk target is
2631 2005-12-26 Mark Mitchell <mark@codesourcery.com>
2634 * decl.c (grokdeclarator): Remove dead code.
2635 * ptree.c (cxx_print_xnode): Handle BASELINK.
2636 * parser.c (make_id_declarator): Add sfk parameter.
2637 (cp_parser_direct_declarator): Do not pass TYPE_DECLs to
2639 (cp_parser_declarator_id): Simplify BASELINKs here.
2640 (cp_parser_member_declaration): Adjust calls to
2643 2005-12-26 Mark Mitchell <mark@codesourcery.com>
2645 PR c++/23171, c++/23172, c++/25417.
2646 * typeck.c (build_unary_op): Create temporary variables for
2647 compound literals whose addresses are taken.
2648 * init.c (expand_aggr_init_1): Use COMPOUND_LITERAL_P.
2649 * decl.c (reshape_init_vector): Likewise.
2650 (reshape_init): Give it external linkage.
2651 (check_initializer): Use COMPOUND_LITERAL_P.
2652 (initialize_artificial_var): Allow the initializer to be a
2654 * call.c (make_temporary_var_for_ref_to_temp): Use
2655 create_temporary_var.
2656 * cp-tree.h (COMPOUND_LITERAL_P): New macro.
2657 (rehape_init): Declare.
2658 * typeck2.c (digest_init): Use COMPOUND_LITERAL_P.
2659 * semantics.c (finish_compound_literal): Use reshape_init.
2661 2005-12-23 Mark Mitchell <mark@codesourcery.com>
2664 * pt.c (instantiate_template): Handle SFINAE.
2666 2005-12-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2668 * decl.c (grokdeclarator): Improve diagnostic for friend
2669 declarations of class members.
2671 2005-12-22 Mark Mitchell <mark@codesourcery.com>
2674 * tree.c (really_overloaded_fn): Tweak comment.
2675 * pt.c (tsubst_call_declarator_parms): Remove.
2676 (tsubst_copy): Call mark_used on the member referenced by an
2678 * semantics.c (finish_qualified_id_expr): Simplify.
2679 * decl2.c (mark_used): Accept BASELINKs.
2682 * typeck.c (build_unary_op): Pass DECLs not names to
2684 * init.c (build_offset_ref): Do not do name lookup. Do not call
2686 * call.c (build_call): Simplify and tidy.
2687 * semantics.c (finish_qualified_id_expr): Call mark_used.
2689 2005-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2692 * parser.c (cp_parser_pure_specifier): Check for PURE_ZERO to
2693 identify a single '0'.
2695 2005-12-20 Mark Mitchell <mark@codesourcery.com>
2698 * decl.c (use_eh_spec_block): New function.
2699 (store_parm_decls): Use it.
2700 (finish_function): Likewise.
2702 2005-12-19 Mark Mitchell <mark@codesourcery.com>
2705 * init.c (expand_member_init): Print messages about baseclasses
2706 using %T rather than %D.
2709 * class.c (add_method): Do not treat templates as identical unless
2710 their return types are the same.
2712 2005-12-12 Mark Mitchell <mark@codesourcery.com>
2715 * tree.c (build_qualified_name): Return error_mark_node for
2718 2005-12-10 Mark Mitchell <mark@codesourcery.com>
2721 * pt.c (tsubst_copy_and_build): Permit dependent types for the
2722 object in a class member access expression.
2724 2005-12-10 Terry Laurenzo <tlaurenzo@gmail.com>
2727 * mangle.c (write_bare_function_type): Mangle return type for
2728 methods of Java classes
2730 2005-12-08 Th�dore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
2732 * call.c (build_conditional_expr): Print types in error messages.
2734 2005-12-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2736 * expr.c (cxx_expand_expr): Call gcc_unreachable instead of abort.
2738 2005-12-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2740 * cp-gimplify.c (gimplify_cp_loop): Use fold_build3.
2742 2005-12-07 Rafael �ila de Esp�dola <rafael.espindola@gmail.com>
2744 * Make-lang.in (c++.all.build, c++.install-normal): Remove.
2746 2005-12-07 Rafael �ila de Esp�dola <rafael.espindola@gmail.com>
2748 * Make-lang.in: Remove all dependencies on s-gtype.
2750 2005-12-06 Aldy Hernandez <aldyh@redhat.com>
2753 * decl.c (reshape_init_array_1): Handle max_index of -1.
2755 2005-12-06 Roger Sayle <roger@eyesopen.com>
2757 * typeck.c (build_binary_op): Issue warning if either operand of a
2758 comparison operator is a string literal, except for testing equality
2759 or inequality against NULL.
2761 2005-12-06 Roger Sayle <roger@eyesopen.com>
2764 * decl.c (compute_array_index_type): Check that itype is an
2765 INTEGER_CST node before testing/clearing TREE_OVERFLOW.
2767 2005-12-05 Daniel Berlin <dberlin@dberlin.org>
2769 * ptree.c (cxx_print_decl): Update to check for decl_common
2772 2005-12-02 Mark Mitchell <mark@codesourcery.com>
2775 * decl.c (duplicate_decls): Don't rely on DECL_TEMPLATE_INFO after
2778 2005-12-02 Richard Guenther <rguenther@suse.de>
2780 * semantics.c (simplify_aggr_init_expr): Use buildN instead
2783 2005-12-02 Gabriel Dos Reis <gdr@integrable-solutions.net>
2785 * parser.c (cp_lexer_new_main): Usr GGC_RESIZEVEC instead of
2787 (cp_parser_template_argument_list): Use XRESIZEVEC instead of
2789 * class.c (pushclass): Likewise.
2791 2005-12-02 Gabriel Dos Reis <gdr@integrable-solutions.net>
2793 * decl2.c (get_priority_info): Use XNEW, not xmalloc.
2794 * decl.c (push_switch): Likewise.
2795 * lex.c (handle_pragma_implementation): Likewise.
2796 * cp-objcp-common.c (decl_shadowed_for_var_insert): Use GGC_NEW,
2798 (cxx_initialize_diagnostics): Use XNEW, not xmalloc.
2799 * class.c (init_class_processing): Use XNEWVEC, not xmalloc.
2800 * g++spec.c (lang_specific_driver): Likewise.
2801 * mangle.c (save_partially_mangled_name): Likewise.
2802 * parser.c (cp_lexer_new_main): Use GGC_NEWVEC, not ggc_alloc.
2803 (cp_parser_template_argument_list): Use XNEWVEC, nto xmalloc.
2804 (cp_parser_sizeof_operand): Likewise.
2805 * repo.c (open_repo_file, open_repo_file): Likewise.
2807 2005-12-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
2809 * parser.c (cp_parser_make_typename_type): Call make_typename_type
2810 with tf_none instead of magic value 0.
2811 (cp_parser_explicit_instantiation): Call do_type_instantiation
2812 with tf_error instead of magic value 1.
2813 (cp_parser_elaborated_type_specifier): Call make_typename_type
2814 with tf_error instead of magic value 1.
2815 (cp_parser_class_name): Likewise.
2816 (cp_parser_lookup_name): Likewise.
2818 2005-12-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
2820 * parser.c (cp_parser_declaration): Set token2.type to CPP_EOF,
2823 2005-11-30 Jason Merrill <jason@redhat.com>
2826 * cp-gimplify.c (cp_genericize_r): Don't dereference invisible reference
2829 2005-11-30 Ben Elliston <bje@au.ibm.com>
2831 * typeck.c (build_x_unary_op): Correct spelling in error message.
2833 2005-11-28 Nathan Sidwell <nathan@codesourcery.com>
2836 * class.c (check_field_decls): Only set DECL_PACKED on a field
2837 when its natural alignment is > BITS_PER_UNIT.
2839 2005-11-27 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2842 * cp-tree.h (DECL_MAIN_P): Remove duplicate definition.
2844 2005-11-26 Richard Henderson <rth@redhat.com>
2846 * lex.c: Update for pragma_lex rename.
2847 * parser.c: Likewise.
2849 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2852 * decl.c (grokparms): Do not allow typedef-names in a '(void)'
2855 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2857 * typeck2.c (process_init_constructor_union): Remove check for
2858 unnamed union members.
2860 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2862 * name-lookup.c (lookup_name_real): Merge two if's.
2864 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2866 * pt.c (instantiate_class_template): Clean-up.
2868 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2870 * pt.c (template_class_depth_real): Remove. Move functionality to ...
2871 (template_class_depth): ... here, replacing count_specializations
2872 with 0. Adjust comment.
2874 2005-11-24 Richard Guenther <rguenther@suse.de>
2875 Dirk Mueller <dmueller@suse.de>
2878 * typeck.c (build_reinterpret_cast_1): Use
2879 strict_aliasing_warning.
2881 2005-11-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2884 * pt.c (check_instantiated_args): Reword diagnostic message about
2885 template argument involving local types.
2887 2005-11-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2890 * typeck.c (build_array_ref): Avoid code duplicate. Use common
2891 C/C++ diagnostic function warn_array_subscript_with_type_char.
2893 2005-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
2896 * error.c (resolve_virtual_fun_from_obj_type_ref): New.
2897 (dump_expr): Use it in <case CALL_EXPR>.
2899 2005-11-21 Richard Henderson <rth@redhat.com>
2901 * cp-objcp-common.h, name-lookup.c, name-lookup.h: Revert 11-18 patch.
2903 * name-lookup.c (lookup_name): Remove prefer_type argument.
2904 (lookup_name_prefer_type): New.
2905 * decl.c (lookup_and_check_tag): Use them.
2906 * pt.c (tsubst_friend_class): Likewise.
2907 (lookup_template_class): Likewise.
2908 (tsubst_copy_and_build): Likewise.
2909 * name-lookup.h (lookup_name_prefer_type): New.
2910 (lookup_name): Remove declaration.
2912 2005-11-18 Mark Mitchell <mark@codesourcery.com>
2915 * decl.c (grokfndecl): Set up DECL_TEMPLATE_INFO before calling
2917 * name-lookup.c (set_decl_namespace):
2919 2005-11-18 Mike Stump <mrs@apple.com>
2921 * cp-objcp-common.h (LANG_HOOKS_LOOKUP_NAME): Add.
2922 * name-lookup.c (lookup_name_two): Remove.
2923 (lookup_name_one): Add.
2924 * name-lookup.h (lookup_name_two): Remove.
2925 (lookup_name_one): Add.
2927 2005-11-15 Jason Merrill <jason@redhat.com>
2930 * method.c (locate_copy): Also use skip_artificial_parms here.
2931 (synthesize_exception_spec): Use CLASS_TYPE_P rather than checking
2933 (locate_ctor): Abort if we fail to find a default constructor.
2935 2005-11-15 Mike Stump <mrs@apple.com>
2937 * name-lookup.c (lookup_name_two): Add.
2938 * name-lookup.h: Likewise.
2940 2005-11-15 Mark Mitchell <mark@codesourcery.com>
2943 * typeck.c (check_for_casting_away_constness): Use the diag_fn.
2944 (build_const_cast_1): Call it, for C-style casts.
2946 2005-11-14 Mark Mitchell <mark@codesourcery.com>
2949 * pt.c (check_explicit_specialization): Don't check for C linkage.
2950 (push_template_decl_real): Likewise.
2951 * parser.c (cp_parser_explicit_specialization): Check here.
2952 (cp_parser_template_declaration_after_export): And here.
2954 * parser.c (cp_lexer_get_preprocessor_token): Initialize keyword
2957 2005-11-14 Jason Merrill <jason@redhat.com>
2960 * method.c (locate_ctor): Skip all artificial parms, not just
2963 2005-11-14 Mark Mitchell <mark@codesourcery.com>
2965 * parser.c (eof_token): Add initializer for ambiguous_p.
2967 2005-11-13 Mark Mitchell <mark@codesourcery.com>
2970 * decl.c (check_redeclaration_exception_specification): New
2972 (duplicate_decls): Use it.
2973 * error.c (fndecl_to_string): Print the template parameter list.
2976 * cxx-pretty-print.c (pp_cxx_statement): Print qualifying scopes
2978 (pp_cxx_original_namespace_definition): Likewise.
2979 * name-lookup.c (ambiguous_decl): Don't issue error messages;
2980 instead return lists of ambiguous candidates.
2981 (select_decl): Handle ambiguous namespace lookups.
2982 * parser.c (cp_token): Add ambiguous_p.
2983 (cp_lexer_get_preprocessor_token): Set it.
2984 (cp_parser_diagnose_invalid_type_name): Avoid duplicate messages
2985 when a qualified name uses an invalid scope.
2986 (cp_parser_primary_expression): Print ambiguous candidates.
2987 (cp_parser_type_parameter): Adjust comment to reflect new
2988 parameter name for cp_parser_lookup_name.
2989 (cp_parser_template_argument): Likewise.
2990 (cp_parser_elaborated_type_specifier): Likewise.
2991 (cp_parser_namespace_name): Likewise.
2992 (cp_parser_class_name): Print ambiguous candidates.
2993 (cp_parser_lookup_name): Rename ambiguous_p parameter to
2994 ambiguous_decls. Use it to return a list of ambiguous candiates
2995 when a lookup is ambiguous.
2996 (cp_parser_lookup_name_simple): Adjust comment to reflect new
2997 parameter name for cp_parser_lookup_name.
2999 2005-11-12 Jakub Jelinek <jakub@redhat.com>
3002 * typeck.c (complete_type): Set TYPE_NEEDS_CONSTRUCTING
3003 and TYPE_HAS_NONTRIVIAL_DESTRUCTOR flags for all variants
3007 * pt.c (tsubst_copy_asm_operands): New function.
3008 (tsubst_expr) <case ASM_EXPR>: Use it.
3010 2005-11-08 Jakub Jelinek <jakub@redhat.com>
3013 * decl.c (redeclaration_error_message): Issue diagnostics about
3014 olddecl and newdecl disagreement on __thread property.
3015 (grokdeclarator): Set DECL_TLS_MODEL on class static variables.
3017 2005-11-08 Jason Merrill <jason@redhat.com>
3020 * method.c (use_thunk): Use build_cplus_new instead of
3023 2005-11-06 Jason Merrill <jason@redhat.com>
3024 James A. Morrison <phython@gcc.gnu.org>
3027 * decl2.c (cp_finish_file): Fix conditions for undefined warning.
3028 Set TREE_NO_WARNING instead of TREE_PUBLIC.
3029 * pt.c (instantiate_pending_templates): Set DECL_INITIAL to avoid
3030 a warning on a function we didn't instantiate because of excessive
3033 2005-11-06 Mark Mitchell <mark@codesourcery.com>
3035 * class.c (record_subobject_offsets): Don't record offsets past
3036 biggest empty class for non-empty base classes.
3037 (layout_class_type): Use TYPE_SIZE_UNIT, not TYPE_SIZE, when
3038 keeping track of the size of emptyclasses.
3041 * class.c (sizeof_biggest_empty_class): New variable.
3042 (record_subobject_offsets): Don't record offsets past biggest
3043 empty class for data members. Replace vbases_p parameter with
3044 is_data_member parameter.
3045 (build_base_field): Adjust call.
3046 (layout_class_type): Likewise. Maintain
3047 sizeof_biggest_empty_class.
3049 2005-11-05 Kazu Hirata <kazu@codesourcery.com>
3051 * decl2.c, init.c, typeck.c: Fix comment typos.
3053 2005-11-04 Richard Guenther <rguenther@suse.de>
3056 * init.c (build_vec_init): Build comparison of matching
3059 2005-11-03 Josh Conner <jconner@apple.com>
3062 pt.c (tsubst): Accept zero-length array if tf_error is set
3063 in complain flags. Change error message for negative-
3066 2005-11-04 Joseph S. Myers <joseph@codesourcery.com>
3068 * cp-tree.h (cp_cpp_error), error.c (cp_cpp_error): Take va_list*
3071 2005-11-03 Joseph S. Myers <joseph@codesourcery.com>
3074 * error.c (cp_cpp_error): New function.
3075 * cp-tree.h (cp_cpp_error): Declare.
3076 * parser.c (cp_lexer_new_main): Set CPP option client_diagnostic
3077 and error callback after lexing.
3079 2005-11-03 Mark Mitchell <mark@codesourcery.com>
3082 * pt.c (register_specialization): Update inline flags on clones.y
3084 2005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
3087 * decl.c (declare_local_label): Return 0 for variables
3088 with error_mark_node as their types.
3090 2005-11-02 Mark Mitchell <mark@codesourcery.com>
3093 * call.c (build_conditional_expr): Do bad conversions, if there's
3097 * parser.c (cp_parser_postfix_dot_deref_expression): Improve error
3098 message for use of overloaded functions on LHS of "." operator.
3101 * parser.c (cp_parser_postfix_expression): Use
3102 cp_parser_elaborated_type_specifier to handle typename-types in
3104 (cp_parser_enclosed_argument_list): Skip ahead to the end of the
3105 template argument list if the closing ">" is not found.
3108 * pt.c (instantiate_decl): Use cp_finish_decl, not
3109 finish_static_data_member_decl.
3111 2005-10-28 Andrew Pinski <pinskia@physics.uc.edu>
3113 * decl.c (grokfndecl): Remove the setting
3114 of the return type of the function type
3115 of main after erroring about must returning
3118 2005-10-28 Andrew Pinski <pinskia@physics.uc.edu>
3121 * decl.c (grokfndecl): Create a new function type
3122 after erroring out about main not returning int.
3124 2005-10-28 Josh Conner <jconner@apple.com>
3127 * parser.c (cp_parser_member_declaration): Detect and handle
3128 a template specialization.
3130 2005-10-28 Andrew Pinski <pinskia@physics.uc.edu>
3133 * decl.c (start_decl): Check that the decl is an
3134 error_mark_node before getting the type.
3135 Remove the check for the decl's type being an
3138 2005-10-21 Mark Mitchell <mark@codesourcery.com>
3141 * parser.c (cp_parser_init_declarator): Pass attributes to
3144 2005-10-20 Mark Mitchell <mark@codesourcery.com>
3147 * search.c (accessible_p): Check access in the outermost set of
3148 template parameters.
3150 2005-10-20 Richard Guenther <rguenther@suse.de>
3152 * decl.c (grokdeclarator): Fix ambiguous pedwarn message.
3154 2005-10-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3157 * decl.c (grokdeclarator): Reject unqualified destructors in
3158 friend declarations.
3160 2005-10-18 Mark Mitchell <mark@codesourcery.com>
3163 * pt.c (convert_template_argument): Use canonical type variants in
3164 template specializations.
3166 2005-10-18 Nathan Sidwell <nathan@codesourcery.com>
3169 * name-lookup.c (arg_assoc): Template args can be null in a
3173 * class.c (update_vtable_entry_for_fn): Don't process invalid
3174 covariant overriders.
3177 * cp-tree.h (add_method): Add return value.
3178 * class.c (add_method): Return success indicator.
3179 * semantics.c (finish_member_declaration): Don't add an invalid
3180 method to the method list.
3182 2005-10-17 Mark Mitchell <mark@codesourcery.com>
3185 * call.c (build_new_method_call): Do not show VTT parameters to
3188 2005-10-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3191 * parser.c (cp_parser_statement): If the parser reached CPP_EOF,
3192 only complain about missing statement.
3194 2005-10-17 Nathan Sidwell <nathan@codesourcery.com>
3197 * cp-tree.h (BASELINK_QUALIFIED_P): New.
3198 * pt.c (tsubst_copy_and_build): <CALL_EXPR case>: Use it.
3199 * typeck.c (finish_class_member_access_expr): Set it.
3202 * decl.c (check_default_argument): Don't check
3203 processing_template_decl or uses_template_parms here.
3204 (grokparms): Only call check_default_argument when not processing
3206 * parser.c (cp_parser_late_parsing_default_arg): Call
3207 check_default_argument when not processing a template decl.
3209 2005-10-16 Mark Mitchell <mark@codesourcery.com>
3212 * decl2.c (mark_used): Use uses_template_parms instead of
3214 * init.c (constant_value_1): Handle uninstantiated templates
3216 * pt.c (instantiate_decl): Add sanity check.
3218 2005-10-16 Mark Mitchell <mark@codesourcery.com>
3221 * typeck.c (check_template_keyword): Fix thinko.
3223 2005-10-16 Andrew Pinski <pinskia@physics.uc.edu>
3226 * decl.c (pop_switch): Only call c_do_switch_warnings
3227 when not processing templates.
3229 2005-10-16 Mark Mitchell <mark@codesourcery.com>
3232 * cp-tree.h (QUALIFIED_NAME_IS_TEMPLATE): New macro.
3233 (check_template_keyword): New function.
3234 (finish_id_expression): Change prototoype.
3235 (finish_qualified_id_expr): Change prototype.
3236 (build_qualified_name): New function.
3237 (finish_class_member_access_expr): Change prototype.
3238 * init.c (build_offset_ref): Use build_qualified_name.
3239 * mangle.c (write_expression): Likewise.
3240 * parser.c (cp_parser_primary_expression): Remove qualifying_class
3241 parameter. Add address_p and template_arg_p. Use
3242 build_qualified_name.
3243 (cp_parser_id_expression): Default *template_p to
3244 template_keyword_p. Check for invalid uses of the template
3246 (cp_parser_postfix_expression): Eliminate special handling for
3247 qualified names. Adjust call to cp_parser_primary_expression.
3248 (cp_parser_postfix_dot_deref_expression): Adjust call to
3249 cp_parser_id_expression and finish_class_member_access_expr.
3250 (cp_parser_template_argument_list): Add comment.
3251 (cp_parser_template_argument): Adjust use of
3252 cp_parser_primary_expression. Remove call to
3253 finish_qualified_id_expr.
3254 (cp_parser_lookup_name): Use build_qualified_name.
3255 * pt.c (tsubst): Use build_qualified_name.
3256 (tsubst_qualified_id): Likewise. Adjust call to
3257 finish_qualified_id_expr.
3258 (tsubst_copy): Use build_qualified_name.
3259 (tsubst_copy_and_build): Adjusts call to finish_id_expression and
3260 finish_class_member_access_expr.
3261 * semantics.c (finish_non_static_data_member): Use
3262 build_qualified_name.
3263 (finish_qualified_id_expr): Add template_p and template_arg_p
3265 (finish_id_expression): Remove qualifiying_class parameter. Add
3266 template_p, done, address_p, and template_arg_p. Use
3267 build_qualified_name. Adjust calls to
3268 finish_class_member_acess_expr.
3269 * tree.c (build_qualified_name): New function.
3270 * typeck.c (check_template_keyword): New function.
3271 (finish_class_member_access_expr): Add template_p argument. Check
3272 for invalid uses of the template keyword.
3274 2005-10-15 Mark Mitchell <mark@codesourcery.com>
3277 * class.c (maybe_warn_about_overly_private_class): Lazy
3278 constructors are public.
3280 2005-10-14 Mark Mitchell <mark@codesourcery.com>
3283 * call.c (convert_like_real): Rely on convert_and_check to issue
3284 warnings about overflow and conversion to unsigned.
3285 * decl.c (finish_enum): Use the location of the enumerators, not
3286 the closing brace of the enumeration, when reporting warnings
3288 (build_enumerator): Use error_mark_node for erroneous values.
3289 * typeck2.c (digest_init): Remove reference to "signature pointer"
3292 2005-10-14 Nathan Sidwell <nathan@codesourcery.com>
3295 * optimize.c (update_cloned_parm): Add FIRST parameter. Use it.
3296 (maybe_clone_body): Track the first clone.
3298 2005-10-13 Nathan Sidwell <nathan@codesourcery.com>
3301 * class.c (build_base_path): The vtable is always the first thing
3304 2005-10-13 Mark Mitchell <mark@codesourcery.com>
3307 * cp-tree.h (DECL_NONTRIVIALLY_INITIALIZED_P): New macro.
3308 * decl.c (duplicate_decls): Merge it into new declarations.
3309 (decl_jump_unsafe): Use it, rather than DECL_INITIAL.
3310 (cp_finish_decl): Set it, when appropriate.
3313 * call.c (build_new_method_call): Correct pretty-printing of
3315 * pt.c (tsubst_qualified_id): Recognize invalid uses of "~T" as an
3319 * decl.c (start_method): Return error_mark_node for errors.
3322 * pt.c (push_template_decl_real): Complain about attempts to
3323 declare template variables.
3326 * pt.c (tsubst_template_parms): Set processing_template_decl while
3327 processing the parameters.
3328 (tsubst_decl): Set processing_template_decl when substituting into
3332 * pt.c (most_specialized_instantiation): Robustify.
3335 * semantics.c (finish_id_expression): Issue errors about uses of
3336 local variables in containing functions even in templates.
3338 2005-10-12 Danny Smith <dannysmith@users.sourceforge.net>
3342 * class.c (finish_struct_1): Call
3343 targetm.cxx.adjust_class_at_definition.
3346 2005-10-12 Nathan Sidwell <nathan@codesourcery.com>
3349 * pt.c (build_non_dependent_expr): Don't wrap a COMPONENT_REF
3350 with already looked up member functions. Assert we're not
3351 returning a NON_DEPENDENT_EXPR with unknown type.
3352 * typeck.c (finish_class_member_access_expr): We can get
3353 non-template-id-expr baselinks. If the lookup finds a baselink,
3354 remember it even inside templates.
3357 * parser.c (cp_parser_functional_cast): Cope when TYPE is not a
3358 TYPE_DECL. Use dependent_type_p to check type.
3359 * pt.c (uses_template_parms_p): Use dependent_type_p for a
3361 (type_dependent_expression_p): Assert we've not been given a
3365 * decl.c (check_function_type): Correctly overwrite incomplete
3366 return type with void type.
3367 * typeck.c (check_return_expr): If the function's return type is
3368 void, don't try and convert a return expr.
3370 2005-10-12 David Edelsohn <edelsohn@gnu.org>
3373 * call.c (build_object_call): If BINFO is NULL, bypass
3374 lookup_fnfields and set fns to NULL_TREE.
3376 2005-10-12 Paolo Bonzini <bonzini@gnu.org>
3379 * error.c (dump_expr): Pass LABEL_DECL to dump_decl. Print
3380 an ADDR_EXPR of a LABEL_DECL as &&.
3382 2005-10-12 Nathan Sidwell <nathan@codesourcery.com>
3385 * class.c (walk_subobject_offsets): Don't walk error_mark_node.
3387 2005-10-11 Ian Lance Taylor <ian@airs.com>
3390 * cvt.c (convert_to_void): Don't warn about unused values when
3391 processing a template declaration.
3393 2005-10-11 Mark Mitchell <mark@codesourcery.com>
3396 * call.c (convert_like_real): Use decl_constant_value, not
3397 integral_constant_value.
3398 * init.c (constant_value_1): New function.
3399 (integral_constant_value): Use it.
3400 (decl_constant_value): Likewise.
3401 * typeck.c (decay_conversion): Use decl_constant_value, not
3402 integral_constant_value.
3405 * parser.c (cp_parser_elaborated_type_specifier): Don't treat
3406 class types as templates if the type is not appearing as part of a
3407 type definition or declaration.
3409 2005-10-10 Mark Mitchell <mark@codesourcery.com>
3412 * pt.c (instantiate_decl): Call finish_static_data_member_decl for
3413 static data members.
3415 2005-10-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3416 Mark Mitchell <mark@codesourcery.com>
3419 * parser.c (cp_parser_template_argument_list): Do not treat
3420 contents of argument list as part of a constant expression.
3422 2005-10-10 Mark Mitchell <mark@codesourcery.com>
3425 * decl.c (grokdeclarator): Do not require template parameter lists
3426 for explicitly specialized class.
3427 * error.c (dump_aggr_type): Do not dump template arguments for
3428 non-primary specializations.
3429 (dump_function_name): Likewise.
3432 * pt.c (instantiate_decl): Instantiate the initializer of
3433 a static data member in the namespace containing the class
3434 containing the static data member.
3436 2005-10-08 James A. Morrison <phython@gcc.gnu.org>
3439 * parser.c (cp_parser_postfix_expression) <RID_TYPENAME>: Treat nontype
3440 scopes as nondependent.
3442 2005-10-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3444 * call.c (resolve_args): Remove redundant test.
3446 2005-10-05 Paolo Bonzini <bonzini@gnu.org>
3448 PR tree-optimization/21419
3449 PR tree-optimization/24146
3450 PR tree-optimization/24151
3452 * semantics.c (finish_asm_stmt): Call readonly_error if outputs are
3453 read-only. Set ASM_VOLATILE_P for asms without outputs.
3455 2005-10-05 Nathan Sidwell <nathan@codesourcery.com>
3458 * call.c (joust): Adjust length count to more_specialized_fn.
3459 * pt.c (more_specialized_fn): Cope with non-static member vs
3462 2005-10-04 Andrew Pinski <pinskia@physics.uc.edu>
3465 * decl.c (make_rtl_for_nonlocal_decl): Use set_user_assembler_name
3466 instead of change_decl_assembler_name.
3468 2005-10-03 Alexandre Oliva <aoliva@redhat.com>
3470 * error.c (dump_type) <UNKNOWN_TYPE>: Print reworded message.
3472 2005-10-03 Mark Mitchell <mark@codesourcery.com>
3475 * repo.c: Include flags.h.
3476 (finish_repo): Add -frandom-seed to the arguments.
3478 2005-10-02 Mark Mitchell <mark@codesourcery.com>
3481 * parser.c (cp_parser_template_argument): Don't turn "T::f" into
3483 * pt.c (convert_nontype_argument): Remove ??? comment.
3486 * tree.c (lvalue_p_1): A VA_ARG_EXPR with class type is an lvalue,
3487 when class rvalues are lvalues.
3489 2005-09-28 Mark Mitchell <mark@codesourcery.com>
3492 * decl.c (grokdeclarator): Always pedwarn about overqualified
3495 2005-09-27 Mark Mitchell <mark@codesourcery.com>
3498 * name-lookup.c (maybe_process_template_type_declaration): Don't
3499 treat forward declarations of classes as templates just because
3500 we're processing_template_decl.
3501 * pt.c (tsubst_decl): Clear DECL_TEMPLATE_INFO for friend
3504 2005-09-26 Jason Merrill <jason@redhat.com>
3507 * cp-tree.h (FUNCTION_NEEDS_BODY_BLOCK): New macro.
3508 * name-lookup.c (pushdecl_maybe_friend): Check it.
3509 * decl.c (begin_function_body): Do nothing if it's false.
3510 (finish_function_body): Ditto.
3511 (outer_curly_brace_block): New fn.
3512 (finish_function): Use it.
3514 2005-09-26 Richard Guenther <rguenther@suse.de>
3517 * decl2.c (do_static_destruction): Remove.
3518 (finish_static_initialization_or_destruction): Likewise.
3519 (DECL_EFFECTIVE_INIT_PRIORITY): New macro.
3520 (NEEDS_GUARD_P): Likewise.
3521 (do_static_initialization): Rename to
3522 do_static_initialization_or_destruction. Process all
3523 initializers/destructors and handle common conditionalizing.
3524 (start_static_initialization_or_destruction): Rename to
3525 one_static_initialization_or_destruction. Handle only
3526 decl-specific conditionalizing.
3527 (cp_finish_file): Call do_static_initialization_or_destruction.
3529 2005-09-22 Jakub Jelinek <jakub@redhat.com>
3532 * class.c (find_final_overrider): Move diagnostic about no unique final
3534 (update_vtable_entry_for_fn): ... here.
3536 2005-09-21 Mark Mitchell <mark@codesourcery.com>
3539 * init.c (integral_constant_value): Use DECL_INTEGRAL_CONSTANT_VAR_P.
3541 2005-09-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3544 * call.c (resolve_args): Return error_mark_node on arguments
3545 whose TREE_TYPE is error_mark_node.
3547 2005-09-20 Jakub Jelinek <jakub@redhat.com>
3550 * rtti.c (get_pseudo_ti_init): Recompute ti pointer after
3551 get_tinfo_ptr calls.
3553 2005-09-16 Mark Mitchell <mark@codesourcery.com>
3556 * parser.c (cp_parser_enclosed_template_argument_list): Make sure
3557 skip_evaluation is false when processing template arguments.
3560 * pt.c (check_instantiated_args): Treat uses of anonymous types as
3561 causing type-deduction failure.
3563 2005-09-15 Jason Merrill <jason@redhat.com>
3566 * cp-tree.def (SIZEOF_EXPR, ALIGNOF_EXPR): Change code class to
3569 2005-09-15 Mark Mitchell <mark@codesourcery.com>
3572 * pt.c (tsubst_aggr_type): Make sure skip_evaluation is false when
3573 processing template arguments.
3575 * pt.c (check_explicit_instantiation_namespace): Fix typo.
3578 * decl.c (check_class_member_definition_namespace): New function.
3579 (grokfndecl): Use it.
3580 (grokvardecl): Likewise.
3581 (grokdecl): Improve documentation.
3582 * pt.c (check_explicit_instantiation_namespace): New function.
3583 (register_specialization): Call check_specialization_namespace
3584 when replacing an implicitly instantiated function.
3585 (check_explicit_specialization): Ensure that DECL_CONTEXT is set
3586 correctly for namespace-scope specializations.
3587 (do_decl_instantiation): Use
3588 check_explicit_instantiation_namespace.
3589 (do_type_instantiation): Likewise.
3591 2005-09-15 Nathan Sidwell <nathan@codesourcery.com>
3594 * error.c (dump_decl): <USING_DECL case> Use USING_DECL_SCOPE.
3596 2005-09-13 Bastian Blank <waldi@debian.org>
3599 * mangle.c (find_substitution): Do not use special substitutions
3600 for identifiers not in std::.
3602 2005-09-13 Mark Mitchell <mark@codesourcery.com>
3605 * typeck.c (cxx_mark_addressable): Only check DECL_HARD_REGISTER
3608 2005-09-13 Mark Mitchell <mark@codesourcery.com>
3611 * pt.c (tsubst_default_argument): Do treat default argument
3612 expressions as occurring in the context of the function called.
3614 2005-09-12 Mark Mitchell <mark@codesourcery.com>
3617 * parser.c (cp_parser_primary_expression): Recognize the closing
3618 ">" of a template-argument-list after a floating-point literal as
3619 the end of a cast expression.
3621 2005-09-12 Mark Mitchell <mark@codesourcery.com>
3624 * cvt.c (perform_qualification_conversions): Don't create
3625 unnecessary NOP_EXPRs.
3626 * pt.c (tsubst_template_arg): Use fold_non_dependent_expr.
3628 2005-09-12 Ian Lance Taylor <ian@airs.com>
3631 * cp-tree.h (struct lang_decl_flags): Add hidden_friend_p
3632 bitfield. Make dummy bitfield one bit smaller.
3633 (DECL_HIDDEN_FRIEND_P): Define.
3634 (pushdecl_maybe_friend): Declare.
3635 (pushdecl_top_level_maybe_friend): Declare.
3636 * decl.c (duplicate_decls): Add newdecl_is_friend parameter.
3637 Change prototype and all callers. Add assertion that a
3638 DECL_ARTIFICIAL FUNCTION_DECL is not DECL_HIDDEN_FRIEND_P. Set
3639 DECL_ANTICIPATED and DECL_HIDDEN_FRIEND_P in duplicated decl if
3641 * name-lookup.c (supplement_binding): Don't ignore a
3642 DECL_HIDDEN_FRIEND_P.
3643 (pushdecl_maybe_friend): Break out contents of pushdecl. Add
3644 is_friend parameter. Set DECL_ANTICIPATED and
3645 DECL_HIDDEN_FRIEND_P for a friend function.
3646 (pushdecl): Just call pushdecl_maybe_friend.
3647 (pushdecl_with_scope): Add is_friend parameter. Change prototype
3649 (pushdecl_namespace_level): Likewise.
3650 (push_overloaded_decl): Likewise. Check DECL_HIDDEN_FRIEND_P as
3651 well as DECL_ANTICIPATED when checking for a builtin.
3652 (do_nonmember_using_decl): Check DECL_HIDDEN_FRIEND_P as well as
3653 DECL_ANTICIPATED when checking for a builtin.
3654 (do_nonmember_using_decl): Likewise.
3655 (pushdecl_top_level_1): Add is_friend parameter. Change all
3657 (pushdecl_top_level_maybe_friend): New function.
3658 (remove_hidden_names): New function.
3659 (struct arg_lookup): Add args field.
3660 (friend_of_associated_class_p): New static function.
3661 (arg_assoc_namespace): Ignore hidden functions which are not
3662 friends of an associated class of some argument.
3663 (lookup_arg_dependent): Remove hidden functions from list passed
3664 in. Initialize k.args.
3665 * name-lookup.h (remove_hidden_names): Declare.
3666 * friend.c (do_friend): Call pushdecl_maybe_friend instead of
3668 * call.c (add_function_candidate): Change DECL_ANTICIPATED test to
3669 an assertion, with a check for DECL_HIDDEN_FRIEND_P.
3670 (build_new_function_call): Add koenig_p parameter. Change
3671 prototype and callers.
3672 * pt.c (register_specialization): Add is_friend parameter. Change
3674 (push_template_decl_real): Change is_friend parameter to bool.
3675 Change prototype and all callers.
3676 (tsubst_friend_class): Call pushdecl_top_level_maybe_friend
3677 instead of pushdecl_top_level.
3679 2005-09-11 Richard Henderson <rth@redhat.com>
3681 * decl2.c (build_anon_union_vars): Copy attributes from the base addr.
3682 * pt.c (tsubst_decl): Substitute in DECL_VALUE_EXPR.
3684 2005-09-09 Gabriel Dos Reis <gdr@integrable-solutions.net>
3686 * parser.c (cp_parser_translation_unit): Simplify. The while-block
3687 was actually executed at most once.
3689 2005-09-09 Richard Henderson <rth@redhat.com>
3692 * cp-tree.def (ALIAS_DECL): Remove.
3693 * cp-lang.c (cp_init_ts): Remove support for it.
3694 * error.c (dump_decl): Likewise.
3695 * name-lookup.c (pushdecl): Likewise.
3696 * semantics.c (finish_id_expression): Likewise.
3697 * decl2.c (build_anon_union_vars): Use a VAR_DECL with
3698 DECL_VALUE_EXPR instead.
3700 2005-09-09 Mark Mitchell <mark@codesourcery.com>
3703 * decl.c (start_preparsed_function): Do not pay attention to
3704 #pragma interface for implicitly-defined methods.
3705 * decl2.c (cp_finish_file): Do not complain about uses of inline
3706 functions that have bodies, even if we decided not to emit the
3707 body in this translation unit.
3708 * semantics.c (note_decl_for_pch): Do not mess with linkage.
3709 (expand_or_defer_fn): Make inline, non-template functions COMDAT
3712 2005-09-08 Richard Henderson <rth@redhat.com>
3715 * decl.c (wrapup_globals_for_namespace): Call
3716 emit_debug_global_declarations.
3717 * decl2.c (cp_finish_file): Likewise.
3719 2005-09-08 Mark Mitchell <mark@codesourcery.com>
3722 * decl2.c (mark_used): Instantiate static data members initialized
3723 by constants, even in a template.
3725 2005-09-08 Andrew Pinski <pinskia@physics.uc.edu>
3728 * parser.c (cp_parser_objc_selector_expression): Treat CPP_SCOPE as
3731 2005-09-07 Richard Guenther <rguenther@suse.de>
3733 * cp-gimplify.c (cp_gimplify_expr): Create empty CONSTRUCTOR
3734 for EMPTY_CLASS_EXPR.
3736 2005-09-06 Jakub Jelinek <jakub@redhat.com>
3739 * typeck.c (check_return_expr): Add no_warning argument. Set
3740 *no_warning to true if "return-statement with no value, in function
3741 returning" warning has been issued.
3742 * cp-tree.h (check_return_expr): Adjust prototype.
3743 * semantics.c (finish_return_stmt): Set TREE_NO_WARNING if
3744 check_return_expr set *no_warning to true.
3746 2005-09-06 Mark Mitchell <mark@codesourcery.com>
3748 * cp-tree.h (rvalue): New function.
3749 * call.c (build_conditional_expr): Use it.
3750 * init.c (build_new_1): Likewise.
3751 * rtti.c (build_dynamic_cast_1): Likewise.
3752 * tree.c (rvalue): New function.
3753 * typeck.c (build_unary_op): Use it.
3754 (build_static_cast_1): Likewise.
3757 * init.c (build_new_1): Make sure the entire array type is
3758 complete, not just its element types.
3760 2005-09-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3762 * decl.c (check_elaborated_type_specifier): Remove redundant check.
3764 2005-09-06 Jakub Jelinek <jakub@redhat.com>
3767 * typeck.c (ignore_overflows): New helper function.
3768 (build_static_cast_1): Use it.
3770 2005-09-06 Kazu Hirata <kazu@codesourcery.com>
3772 * cp-tree.h, decl.c, decl2.c, semantics.c: Fix comment typos.
3773 Follow spelling conventions.
3775 2005-09-05 Mark Mitchell <mark@codesourcery.com>
3778 * pt.c (tsubst_decl): Clear DECL_TEMPLATE_INSTANTIATED when
3781 2005-09-05 Mark Mitchell <mark@codesourcery.com>
3784 * semantics.c (finish_stmt_expr_expr): Add an explicit
3785 initialization to the last statement in the statement-expression.
3786 * (finish_stmt_expr): Adjust accordingly.
3788 2005-09-03 Mark Mitchell <mark@codesourcery.com>
3791 * decl2.c (mark_used): Always instantiate static data members
3792 initialized by constant expressions.
3793 * pt.c (instantiate_decl): Instantiate the initializers for static
3794 data members initialized by constant expressions.
3797 * semantics.c (expand_or_defer_fn): Do not call ggc_collect when
3798 finishing processing for a template function in a local class.
3800 2005-09-02 Mark Mitchell <mark@codesourcery.com>
3801 * parser.c (cp_parser_class_specifier): Push/pop GC contexts
3802 around functions in local classes.
3804 2005-09-02 Mark Mitchell <mark@codesourcery.com>
3807 * parser.c (cp_parser_class_specifier): Push/pop GC contexts
3808 around functions in local classes.
3810 2005-08-31 Andrew Pinski <pinskia@physics.uc.edu>
3813 * decl2.c (cp_finish_file): If this is obj-c++ and we need a static
3814 init, call generate_ctor_or_dtor_function.
3816 2005-08-31 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3819 * parser.c (cp_parser_lookup_name): Pass LOOKUP_COMPLAIN to
3820 lookup_name_real on final parse.
3822 2005-08-31 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3825 * semantics.c (qualified_name_lookup_error): Do not complain again
3828 2005-08-30 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3831 * parser.c (cp_parser_namespace_name): Move diagnostic for
3832 invalid namespace-name to here from ...
3833 * name-lookup.c (do_namespace_alias): ... here and ...
3834 (do_using_directive): ... here. Remove dead code.
3836 2005-08-28 Mark Mitchell <mark@codesourcery.com>
3839 * cp-tree.h (saved_scope): Add skip_evaluation.
3840 * decl.c (start_decl): Use DECL_INITIALIZED_IN_CLASS_P, not
3841 DECL_INITIAL, to determine whether or not a static data member was
3842 initialized in the class-specifier.
3843 (cp_finish_decl): Add comment.
3844 * init.c (integral_constant_value): Subtitute into the
3845 initializers for static data members in templates.
3846 * name-lookup.c (push_to_top_level): Save skip_evaluation.
3847 (pop_from_top_level): Restore it.
3848 * pt.c (instantiate_class_template): Do not substitute into the
3849 intializers of static data members when instantiating a class.
3850 (regenerate_decl_from_template): Simplify.
3851 (instantiate_decl): Tidy. Substitute into the initializer for a
3852 static data member even when the definition of the data member is
3855 2005-08-26 Mark Mitchell <mark@codesourcery.com>
3858 * pt.c (uses_template_parms): Handle IDENTIFIER_NODE.
3859 (type_dependent_expression_p): Allow BASELINKs whose associated
3860 functions are simply a FUNCTION_DECL.
3863 * cp-tree.h (build_vec_init): Adjust prototype.
3864 * init.c (perform_member_init): Adjust call to build_vec_init.
3865 (build_aggr_init): Likewise.
3866 (build_new_1): Do not call build_default_init for array types.
3867 (build_vec_init): Add explicit_default_init_p parameter. Perform
3868 default initialization of vector elements when set.
3869 * typeck.c (build_modify_expr): Adjust call to build_vec_init.
3871 2005-08-25 Nathan Sidwell <nathan@codesourcery.com>
3874 * typeck.c (build_x_unary_op): Make sure OFFSET_REF is not for a
3877 2005-08-24 Nathan Sidwell <nathan@codesourcery.com>
3880 * parser.c (cp_lexer_peek_nth_token): Relax assert.
3882 2005-08-23 Nathan Sidwell <nathan@codesourcery.com>
3885 * pt.c (tsubst_qualified_id): A SCOPE_REF can still remain.
3887 2005-08-22 James E Wilson <wilson@specifix.com>
3889 PR tree-optimization/23426
3890 * decl.c (grokdeclarator): Use TYPE_SIZE_UNIT not TYPE_SIZE for
3893 2005-08-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3896 * pt.c (push_template_decl_real): Return error_mark_node if the
3897 number of template parameters does not match previous definition.
3899 2005-08-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3902 * decl.c (require_complete_types_for_parms): Mark incomplete types
3905 2005-08-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3907 * parser.c (cp_parser_nth_token_starts_template_argument_list_p):
3908 Fix typo in leading comment.
3910 2005-08-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3912 * name-lookup.c, ptree.c: Delete HOST_PTR_PRINTF.
3914 2005-08-15 Fariborz Jahanian <fjahanian@apple.com>
3916 * cp-tree.h (can_convert_arg, fn_type_unification): New argument.
3917 * call.c (add_template_candidate_real): Pass down 'flags' to
3918 fn_type_unification.
3919 (can_convert_arg): New 'flags' argument. Pass it to call to
3920 implicit_conversion instead of LOOKUP_NORMAL.
3921 (can_convert): Add LOOKUP_NORMAL to call to can_convert_arg.
3922 * class.c (resolve_address_of_overloaded_function): Ditto.
3923 (resolve_address_of_overloaded_function): Ditto.
3924 * decl.c (reshape_init, check_default_argument): Ditto.
3925 * typeck.c (build_ptrmemfunc): Ditto.
3926 * pt.c (type_unification_real): Add 'flags' argument.
3927 (fn_type_unification): Pass 'flags' to type_unification_real.
3928 (type_unification_real): Pass new 'flags' argument to call to
3931 2005-08-12 Giovanni Bajo <giovannibajo@libero.it>
3932 Nathan Sidwell <nathan@codesourcery.com>
3936 * pt.c (unify) <METHOD_TYPE>: Check this-pointer cv-qualifiers
3939 2005-08-12 Nathan Sidwell <nathan@codesourcery.com>
3942 Revert my 2005-07-08 patch
3943 * pt.c (type_unification_real): Remove is_method_argument and
3945 (fn_type_unification, unify): Adjust type_unification_real calls.
3947 2005-08-11 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3950 * decl2.c (grokfield): Check that method is not static before
3953 2005-08-11 Nathan Sidwell <nathan@codesourcery.com>
3956 * name-lookup.c (pushtag): Process the template type before
3957 altering the identifier lookup fields. Remove unreachable code
3958 creating an empty stub decl.
3960 2005-08-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3963 * decl.c (grokdeclarator): Reset storage_class after error.
3965 2005-08-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3968 * init.c (build_new_1): Check for empty candidate list.
3970 2005-08-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3973 * pt.c (tsubst) <case METHOD_TYPE>: Check for error_mark_node
3974 before calling build_exception_variant.
3976 2005-08-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3979 * pt.c (tsubst_decl) <case TEMPLATE_DECL>: Return ERROR_MARK_NODE
3980 if substitution of template args did not succeed.
3982 2005-08-06 Michael Matz <matz@suse.de>
3984 * method.c (use_thunk): Call init_insn_lengths.
3986 2005-08-05 James A. Morrison <phython@gcc.gnu.org>
3989 * name-lookup.c (cp_emit_debug_info_for_using): Do nothing if
3990 sorrycount or errorcount are nonzero.
3992 2005-08-05 Mark Mitchell <mark@codesourcery.com>
3994 * name-lookup.c (pushtag): Remove accidental commit from:
3995 2004-12-21 Mark Mitchell <mark@codesourcery.com>
3997 * decl.c (grokdeclarator): Return error_mark_node, not
3998 void_type_node, to indicate errors.
3999 * parser.c (cp_parser_template_parameter_list): Robustify.
4000 (cp_parser_template_parameter): Likewise.
4002 2005-08-01 Kazu Hirata <kazu@codesourcery.com>
4004 * class.c, decl.c, name-lookup.c, pt.c, typeck.c, typeck2.c:
4007 2005-07-29 Kazu Hirata <kazu@codesourcery.com>
4009 * method.c: Fix a comment typo.
4011 2005-07-28 Mark Mitchell <mark@codesourcery.com>
4014 * call.c (add_builtin_candidate): Adjust for changes in
4015 representation of pointer-to-member types.
4017 2005-07-28 Mike Stump <mrs@apple.com>
4019 * pt.c (check_explicit_specialization): Add visibility logic.
4020 (lookup_template_class): Likewise.
4021 (instantiate_class_template): Likewise.
4023 2005-07-27 Devang Patel <dpatel@apple.com>
4025 * name-lookup.c (pushtag): Do no set DECL_IGNORED_P bit.
4027 2005-07-25 Ian Lance Taylor <ian@airs.com>
4029 * ptree.c (cxx_print_identifier): Print a leading space if the
4032 2005-07-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4034 * call.c (convert_for_arg_passing): Check function pointers when
4035 -Wmissing-format-attribute is activated.
4036 * typeck.c (convert_for_assignment): Likewise.
4038 2005-07-22 Manfred Hollstein <mh@suse.com>
4040 * parser.c (cp_parser_declaration): Fix unitialised warnings.
4042 2005-07-21 Andrew Pinski <pinskia@physics.uc.edu>
4044 * class.c (build_base_path): Fix typo.
4046 2005-07-21 Andrew Pinski <pinskia@physics.uc.edu>