1 2006-10-11 Lee Millward <lee.millward@codesourcery.com>
4 * cp-tree (struct cp_decl_specifier_seq): Rename to
5 conflicting_specifiers_p
6 * parser.c (cp_parser_set_storage_class): Set
7 conflicting_specifiers_p for the input decl specifier
8 if a typedef specifier is present. Rename uses of
9 multiple_specifiers_p to conflicting_specifiers_p.
10 (cp_parser_decl_specifier_seq) <RID_TYPEDEF>: If a storage
11 class specifier has already been set for this declaration,
12 set conflicting_specifiers_p to true on the decl_specs.
13 * decl.c (grokdeclarator): Rename uses of
14 multiple_specifiers_p to conflicting_specifiers_p.
16 2006-10-10 Brooks Moses <bmoses@stanford.edu>
18 * Make-lang.in: Added "c++.pdf" target support.
20 2006-10-10 Richard Guenther <rguenther@suse.de>
22 PR rtl-optimization/29323
23 * decl.c (finish_function): Set TREE_NOTHROW only for
24 functions that bind local.
26 2006-10-09 Richard Henderson <rth@redhat.com>
30 2006-10-04 Richard Henderson <rth@redhat.com>
31 Jakub Jelinek <jakub@redhat.com>
33 * decl.c (grokvardecl): Don't error if !have_tls.
34 (grokdeclarator): Likewise.
35 * parser.c (cp_parser_omp_threadprivate): Likewise.
37 2006-10-03 Mark Mitchell <mark@codesourcery.com>
40 * friend.c (do_friend): Improve comments; add assertion.
41 * parser.c (cp_parser_nested_name_specifier_opt): Resolve
42 typenames for qualified names used in declarations, even when
43 caching qualified name lookup.
46 * decl2.c (grokfield): Don't handle access declarations here.
47 * parser.c (cp_parser_using_declaration): Handle access
49 (cp_parser_block_declaration): Adjust calls to
50 cp_parser_using_declaration.
51 (cp_parser_member_declaration): Likewise. Use
52 cp_parser_using_declaration to look for access_declarations.
54 2006-10-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
57 * init.c (build_new): Check for invalid init.
59 2006-10-02 Mark Mitchell <mark@codesourcery.com>
62 * typeck.c (cxx_sizeof_or_alignof_type): Tidy. In templates, do
63 not try to actually evaluate sizeof for a VLA type.
65 2006-10-01 Mark Mitchell <mark@codesourcery.com>
68 * pt.c (tsubst_baselink): Substituteinto the qualifying scope.
69 * semantics.c (baselink_for_fns): Build a baselink, even when
70 processing a template.
73 * parser.c (cp_parser_postfix_dot_deref_expression): Use
74 BASELINK_ACCESS_BINFO as the qualifying scope when calling
75 adjust_result_of_qualified_name_lookup.
77 2006-09-25 Lee Millward <lee.millward@codesourcery.com>
81 * cp-tree.h (redeclare_class_template): Adjust declaration
82 to return bool instead of void.
83 * pt.c (redeclare_class_template): Update definition.
84 Return false on error.
85 * decl.c (xref_tag): Return error_mark_node if
86 redeclare_class_template returned false.
89 * cp-tree.h (begin_specialization): Return bool
91 * pt.c (check_specialization_scope): Likwise.
92 Adjust comment. Return false if a specialization
93 isn't permitted in the current scope.
94 (begin_specialization): Use the return value of
95 check_specialization_scope.
96 * parser.c (cp_parser_explicit_specialization): If
97 begin_specialization returned false, skip the rest
98 of the specialization.
100 2006-09-21 Mark Mitchell <mark@codesourcery.com>
103 * typeck.c (build_unary_op): Don't form an ADDR_EXPR around a
106 2006-09-21 Lee Millward <lee.millward@codesourcery.com>
109 * decl.c (shadow_tag): Return error_mark_node
110 if maybe_process_partial_specialization failed.
113 * decl.c (grokdeclarator): Return error_mark_node on
114 declaration with two or more data types.
116 2006-09-20 Danny Smith <dannysmith@users.sourceforge.net>
119 * class.c (check_for_override): Remove dllimport from virtual
122 2006-09-18 Steven Bosscher <steven@gcc.gnu.org>
125 * parser.c (cp_parser_labeled_statement): Return nothing. Do
126 not take in_statement_expr and in_compound as arguments. Rename
127 to cp_parser_label_for_labeled_statement. Parse only the label,
129 (cp_parser_statement): Parse the statement of a labeled-statement
130 from here, using tail recursion.
132 2006-09-14 Andrew Pinski <pinskia@physics.uc.edu>
135 * init.c (build_zero_init): If we have an error mark node for
136 the array size, return.
138 2006-09-10 Mark Mitchell <mark@codesourcery.com>
141 * cp-objcp-common.c (cxx_staticp): New function.
142 * cp-objcp-common.h (LANG_HOOOKS_STATICP): Use it.
143 * cp-tree.h (cxx_staticp): New function.
145 2006-09-09 Jason Merrill <jason@redhat.com>
148 * cvt.c (convert_to_void): Strip COMPONENT_REF to functions.
150 2006-09-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
153 * parser.c (cp_parser_skip_until_found): Rename to
154 cp_parser_skip_to_end_of_template_parameter_list. Remove last two
155 parameters. Track levels of '< ... >'. Stop at '{', '}', or ';'.
156 Reorganize. Adjust comment.
157 (cp_parser_template_declaration_after_export): Adjust call.
158 (cp_parser_enclosed_template_argument_list): Likewise.
160 2006-09-07 Andrew Pinski <pinskia@physics.uc.edu>
163 * init.c (build_new_1): Build a distinct type copy
164 for the array type that was returned from
165 build_cplus_array_type.
167 2006-09-07 Jason Merrill <jason@redhat.com>
170 * cvt.c (convert_to_void): Enable previous change.
173 * method.c (use_thunk): Clear DECL_HAS_VALUE_EXPR_P on copied
176 2006-09-07 Simon Martin <simartin@users.sourceforge.net>
179 * pt.c (fold_non_dependent_expr): Make sure expr is not
180 dereferenced if it is NULL.
182 2006-09-06 Zak Kipling <zak@transversal.com>
185 * decl.c (make_rtl_for_nonlocal_decl),
186 (start_preparsed_function): Don't use lbasename on
187 input_filename when calling get_fileinfo.
188 * semantics.c (begin_class_definition): Likewise.
189 * lex.c (cxx_make_type): Likewise.
190 (handle_pragma_interface): Call get_fileinfo on input_filename,
191 not on the parameter to the directive.
193 2006-09-06 Mark Mitchell <mark@codesourcery.com>
196 * pt.c (tsubst): Use fold_non_dependent_expr to fold array
200 * pt.c (unify): Avoid unnecessary calls to fold_build2 for array
203 2006-09-06 Jason Merrill <jason@redhat.com>
206 * cvt.c (convert_to_void): Strip useless TARGET_EXPR.
207 * cp-tree.h (TARGET_EXPR_IMPLICIT_P): New macro.
208 * tree.c (build_cplus_new): Set it.
211 * cvt.c (convert_to_void): Replace a subexpression with no side
212 effects with void_zero_node.
213 * tree.c (is_overloaded_fn): Look through COMPONENT_REF.
214 (get_first_fn): Ditto.
215 * decl.c (grokdeclarator): No need to look through COMPONENT_REF.
217 2006-09-05 Jason Merrill <jason@redhat.com>
220 * parser.c (cp_parser_diagnose_invalid_type_name): Handle the case
221 where the name is a type used incorrectly.
224 * typeck.c (maybe_warn_about_returning_address_of_local): Look
225 through COMPONENT_REF and ARRAY_REF.
228 * name-lookup.c (do_class_using_decl): Try to find the base even
229 if bases_dependent_p.
230 * pt.c (type_dependent_expression_p): A USING_DECL is dependent.
233 * pt.c (tsubst_friend_function): Set DECL_INITIAL before pushdecl.
235 2006-09-04 Nathan Sidwell <nathan@codesourcery.com>
237 PR 23287 Revert my 2006-09-01 patch.
238 * parser.c: Reverted.
241 2006-09-02 Lee Millward <lee.millward@codesourcery.com>
247 * parser.c (cp_parser_template_parameter_list): Add
248 invalid template parameters to the parameter list as
251 2006-09-02 Jakub Jelinek <jakub@redhat.com>
254 * except.c (build_throw): Only set current_function_returns_abnormally
258 * repo.c (repo_file): Remove.
259 (open_repo_file, reopen_repo_file_for_write): Return fopened
260 FILE * instead of setting global repo_file variable.
261 (init_repo): Adjust caller.
262 (finish_repo): Likewise. Return instead of goto out before
263 reopen_repo_file_for_write has been called.
265 2006-09-01 Nathan Sidwell <nathan@codesourcery.com>
268 * semantics.c (finish_call_expr): Add assert.
269 * name-lookup.c (lookup_arg_dependent): Check we found an overload
273 * parser.c (cp_parser_id_expression): Add member_p
274 argument. Update all callers.
275 (cp_parser_unqualified_id): Likewise. Lookup a destructor name in
276 the object's scope, if valid.
277 (cp_parser_global_scope_opt): Add object_scope_valid_p. Update
279 (cp_parser_postfix_dot_deref_expression): Set object_scope.
280 * pt.c (tsubst_copy_and_build): Lookup dependent dtor name here.
282 2006-08-30 Jason Merrill <jason@redhat.com>
285 * class.c (check_field_decls): Don't unset TYPE_PACKED until all
286 the fields have been processed.
288 2006-08-29 Andrew Pinski <pinskia@physics.uc.edu>
291 * call.c (build_x_va_arg): Remove the reference type
292 from the type before creating the pointer type.
294 2006-08-29 J"orn Rennecke <joern.rennecke@st.com>
297 * except.c (expand_start_catch_block): Use correct types for bitwise
300 2006-08-28 Jason Merrill <jason@redhat.com>
303 * class.c (check_field_decls): Unset TYPE_PACKED (t) if one of the
304 fields can't be packed.
307 * cvt.c (convert_to_void): Don't automatically load from volatiles
308 of TREE_ADDRESSABLE type.
310 2006-08-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
313 * cp-tree.h (maybe_process_partial_specialization): Return
314 tree instead of void.
315 * parser.c (cp_parser_class_head): Use return value of
316 maybe_process_partial_specialization.
317 * pt.c (maybe_process_partial_specialization): Return error_mark_node
318 for broken specializations, TYPE otherwise. Check for template
321 2006-08-27 Mark Mitchell <mark@codesourcery.com>
324 * pt.c (register_specialization): Return error_mark_node for
325 specialization-after-instantiation.
326 * decl2.c (mark_used): Mark the main function used when one of its
329 2006-08-27 Lee Millward <lee.millward@codesourcery.com>
332 * class.c (check_field_decls): Don't issue error about
333 local classes containing static data members.
335 2006-08-26 Joseph S. Myers <joseph@codesourcery.com>
338 * parser.c (struct cp_token): Add input_file_stack_index.
340 (cp_lexer_get_preprocessor_token): Save input_file_stack_tick.
341 (cp_lexer_set_source_position_from_token): Restore input file
344 2006-08-26 Lee Millward <lee.millward@codesourcery.com>
349 * pt.c (process_template_parm): Store invalid template
350 parameters as a TREE_LIST with a TREE_VALUE of error_mark_node.
351 (push_inline_template_parms_recursive): Check for template
352 parameters having a TREE_VALUE of error_mark_node rather than
353 check the parameter itself.
354 (mangle_class_name_for_template): Likewise.
355 (comp_template_parms): When comparing the individual template
356 parameters, return 1 if either is error_mark_node.
357 (current_template_args): Robustify.
358 (redeclare_class_template): Likewise.
360 2006-08-26 Mark Mitchell <mark@codesourcery.com>
363 * class.c (resolve_address_of_overloaded_function): Add
364 access_path parameter. Perform access checks.
365 (instantiate_type): Adjust call to
366 resolve_address_of_overloaded_function. Remove unnecessary code.
367 * tree.c (is_overloaded_fn): Document. Return 2 when there are
368 acutally multiple functions.
369 (really_overloaded_fn): Use is_overloaded_fn.
370 * mangle.c (write_expression): Handle BASELINKs.
371 * cp-tree.h (really_overloaded_fn): Return bool.
372 (baselink_for_fns): Declare.
373 * search.c (lookup_member): Check access for single static
375 * pt.c (convert_nontype_argument_function): Handle BASELINKs.
376 (tsubst_copy_and_build): Generate BASELINKs for template-ids.
377 * semantics.c (finish_call_expr): Use baselink_for_fns.
378 (baselink_for_fns): New function.
379 (finish_id_expression): Use it.
380 * parser.c (cp_parser_template_argument): Don't strip BASELINKs.
383 * pt.c (tsubst): Issue errors about attempts to create VLAs at
384 template-instantiation time.
386 2006-08-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
389 * typeck2.c (cxx_incomplete_type_diagnostic): Handle template
390 template parameters. Improve error message for template type
394 * cp-tree.h (grok_op_properties): Return bool instead of void.
395 * decl.c (grokfndecl): Discard invalid operator declarations.
396 (copy_fn_p): Revert change for PR 27547.
397 (grok_op_properties): Return error status (true on success).
398 * pt.c (tsubst_decl): Discard invalid operator declarations.
400 2006-08-25 Mark Mitchell <mark@codesourcery.com>
403 * decl.c (grokdeclarator): Disallow declarations with qualified
404 names in local scopes.
406 2006-08-25 Nathan Sidwell <nathan@codesourcery.com>
409 * decl.c (make_typename_type): Only try and resolve it when
410 context is not dependent. Refactor.
411 * decl2.c (check_classfn): Push to class scope before looking for
414 2006-08-24 Danny Smith <dannysmith@users.sourceforge.net>
417 * g++spec.c (lang_specific_driver): Always check if we need to
418 swallow a space-separated arg to '-x'.
419 * lang-specs.h: Don't create ouput files for '-xc++-header'
422 2006-08-23 Jason Merrill <jason@redhat.com>
425 * pt.c (push_template_decl_real): A friend template with class
428 2006-08-23 Benjamin Smedberg <benjamin@smedbergs.us>
431 * rtti.c (build_dynamic_cast, build_dynamic_cast_1):
432 Move -fno-rtti check to be more specific.
434 2006-08-22 Jason Merrill <jason@redhat.com>
437 * call.c (build_over_call): Don't make a copy here if build_call
440 2006-08-22 Andrew Pinski <pinskia@physics.uc.edu>
443 * cp/init.c (build_zero_init): Handle VECTOR_TYPE and
446 2006-08-22 Simon Martin <simartin@users.sourceforge.net>
449 * parser.c (cp_parser_postfix_expression): Make sure that the
450 saved value for parser->type_definition_forbidden_message is
451 restored before returning to avoid an invalid free().
453 2006-08-22 Jason Merrill <jason@redhat.com>
456 * typeck.c (merge_types): If either of the types have the right
457 attributes, return that one.
459 * tree.c (cp_build_type_attribute_variant): Make sure we aren't
460 doing this to class types.
461 * typeck.c (original_type): Deal with type quals properly.
463 2006-08-21 Jason Merrill <jason@redhat.com>
466 * semantics.c (finish_stmt_expr_expr): Don't try to voidify here,
467 just leave the expression as it is.
468 (finish_stmt_expr): If the statement-expression has class type,
469 wrap it in a TARGET_EXPR.
470 * cp-gimplify.c (cp_gimplify_init_expr): Don't bother with
472 * except.c (build_throw): Give the CLEANUP_POINT_EXPR void type.
474 2006-08-21 Lee Millward <lee.millward@codesourcery.com>
477 * decl.c (duplicate_decls): Return early if either
478 newdecl or olddecl is error_mark_node.
481 * decl.c (grokdeclarator): Return early after
482 issuing diagnostic about an incomplete type.
485 * tree.c (decl_anon_ns_mem_p): Robustify.
486 * decl2.c (determine_visibility): Likewise.
488 2006-08-20 Mark Mitchell <mark@codesourcery.com>
491 * tree.c (cast_valid_in_integral_constant_expression_p): New
493 * cp-tree.h (tsubst_copy_and_build): Adjust prototype.
494 * pt.c (tsubst_expr): Add integral_constant_expression_p
496 (fold_non_dependent_expr): Adjust callers of
497 tsubst_{expr,copy_and_build}.
498 (tsubst_friend_function): Likewise.
499 (tsubst_template_arg): Likewise.
500 (tsubst_default_argument): Likewise.
501 (tsubst_decl): Likewise.
503 (tsubst_omp_clasuses): Likewise.
504 (regenerate_decl_fromp_template): Likewise.
505 (instantiate_decl): Likewise.
506 (tsubst_initializer_list): Likewise.
507 (tsubst_enum): Likewise.
508 (tsubst_expr): Use RECUR throughout.
509 (tsubst_copy_and_build): Change definition of RECUR. Do not allow
510 invalid casts in integral constant expressions.
511 * parser.c (cp_parser_postfix_expression): Use
512 cast_valid_in_integral_constant_expression_p.
513 (cp_parser_cast_expression): Likewise.
514 (cp_parser_functional_cast): Likewise.
517 * pt.c (tsubst_qualified_id): Do not strip references from
520 2006-08-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
523 * parser.c (cp_parser_diagnose_invalid_type_name): Handle BIT_NOT_EXPR.
525 (cp_parser_parse_and_diagnose_invalid_type_name): Tighten condition
526 for valid type-names.
527 (cp_parser_unqualified_id): Fix error handling for destructors.
530 * decl.c (xref_tag): Improve error message. Return early on error.
533 * pt.c (tsubst_copy_and_build) <case CONSTRUCTOR>: Robustify.
535 2006-08-17 Paolo Bonzini <bonzini@gnu.org>
538 * semantics.c (finish_offsetof): Add new argument to fold_offsetof.
540 2006-08-16 Andrew Pinski <pinskia@physics.uc.edu>
543 * typeck.c (build_unary_op <case BIT_NOT_EXPR:>): Don't call
544 perform_integral_promotions for non integral type.
546 2006-08-16 Jason Merrill <jason@redhat.com>
549 * pt.c (tsubst) [TEMPLATE_TYPE_PARM]: Ignore quals from template
550 if arg is a function.
552 2006-08-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
555 * init.c (build_new): Return early on invalid placement.
557 2006-08-15 Lee Millward <lee.millward@codesourcery.com>
560 * pt.c (process_template_parm): Robustify.
562 2006-08-14 Steve Ellcey <sje@cup.hp.com>
566 * operators.def: Remove <?, ?>, <?=, and >?= operators.
567 * parser.c: Remove CPP_MIN, CPP_MAX, CPP_MIN_EQ, and CPP_MAX_EQ.
568 (cp_parser_warn_min_max): Remove.
570 2006-08-11 Jason Merrill <jason@redhat.com>
573 * parser.c (cp_parser_elaborated_type_specifier): Also ignore
574 attributes applied to a TYPENAME_TYPE.
576 2006-08-09 Lee Millward <lee.millward@codesourcery.com>
579 * pt.c (coerce_template_parms): Copy across the
580 invalid template arguments to the new template inner arguments.
581 (retrieve_specialization): Robustify.
584 * pt.c (coerce_template_template_parms): Robustify.
587 * error.c (dump_template_parms): Robustify.
590 * pt.c (redeclare_class_template): Robustify.
593 * pt.c (type_unification_real): Robustify.
595 2006-08-03 Lee Millward <lee.millward@codesourcery.com>
598 * decl.c (start_decl): Return error_mark_node if a
599 diagnostic was issed for an invalid typedef initialization.
601 2006-08-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
604 * parser.c (cp_parser_unqualified_id): Check for invalid scopes
605 when parsing destructor names.
608 * decl.c (duplicate_decls): Call check_default_args here.
609 (start_preparsed_function): Do not call check_default_args.
610 * name-lookup.c (pushdecl_maybe_friend): Only call
611 check_default_args if duplicate_decls got bypassed.
613 2006-08-02 Richard Guenther <rguenther@suse.de>
617 2006-07-05 Richard Guenther <rguenther@suse.de>
618 Andrew Pinski <pinskia@gcc.gnu.org>
621 * cp-objcp-common.c (cxx_types_compatible_p): Ignore
622 top level qualifiers for pointer type comparisons.
624 2006-08-02 Mark Mitchell <mark@codesourcery.com>
627 * pt.c (tsubst_baselink): Substitute into BASELINK_OPTYPE.
629 2006-07-31 Mark Mitchell <mark@codesourcery.com>
632 * tree.c (stabilize_expr): Tweak documentation. Add assertion.
633 (stabilize_call): Tweak documentation.
634 (stabilize_init): Only call stabilize_call for calls.
636 2006-08-01 Steve Ellcey <sje@cup.hp.com>
639 * decl2.c (check_classfn): Remove early return.
640 * search.c (lookup_member): Return NULL with bad type.
642 2006-08-01 Steve Ellcey <sje@cup.hp.com>
645 * decl.c (check_initializer): Check for 1 initializer on scalar types.
647 2006-08-01 Daniel Jacobowitz <dan@codesourcery.com>
650 * pt.c (tsubst_copy_and_build): Mark used enum types.
651 * semantics.c (finish_id_expression): Likewise.
653 2006-07-31 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
656 * decl.c (grokdeclarator): Check whether "long" or "short" was
657 specified for non-integral types.
659 2006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
661 * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
663 2006-07-28 Lee Millward <lee.millward@codesourcery.com>
667 * pt.c (process_template_parm) Store invalid template
668 parameters as error_mark_node in the paramater list.
669 (push_inline_template_parms_recursive): Handle invalid
671 (comp_template_parms): Likewise.
672 (check_default_tmpl_arg): Likewise.
673 (coerce_template_template_parms): Likewise.
674 (mangle_class_name_for_template): Likewise.
675 (tsubst_template_parms): Likewise.
676 * error.c (dump_template_argument_list): Likewise.
678 2006-07-28 Kazu Hirata <kazu@codesourcery.com>
680 * cp-tree.h: Fix a comment typo.
682 2006-07-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
685 * decl.c (grokdeclarator): Return error_mark_node after invalid
688 2006-07-23 Daniel Jacobowitz <dan@codesourcery.com>
691 * decl.c (grokvardecl): Use FROB_CONTEXT.
692 * pt.c (register_specialization): Likewise.
694 2006-07-23 Mark Mitchell <mark@codesourcery.com>
697 * cp-tree.h (LOOKUP_HIDDEN): New macro. Reformat comments.
698 * name-lookup.c (unqualified_namespace_lookup): There is no way to
699 have a hidden name in non-namespace scopes.
700 * pt.c (tsubst_friend_class): Look for hidden names.
701 * decl.c (lookup_and_check_tag): Fix typo in comment.
703 * semantics.c (finish_compound_literal): Fix typo in comment.
705 2006-07-21 Jason Merrill <jason@redhat.com>
707 * decl2.c (determine_visibility): Don't propagate visibility from
709 (constrain_class_visibility): Don't warn in system headers.
710 Don't warn about pointer fields.
712 2006-07-20 Mike Stump <mrs@apple.com>
714 * decl2.c (determine_visibility_from_class): Don't use hidden
715 visibility for explicit instantiations.
717 2006-07-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
720 * pt.c (tsubst_expr): Only apply DECL_TEMPLATE_INSTANTIATED to
721 valid decls. Cleanup.
724 * semantics.c (check_template_template_default_arg): Simplify
727 2006-07-20 Jason Merrill <jason@redhat.com>
730 * decl.c (grokvardecl): Set DECL_THIS_STATIC on file-scope
731 const variables with implicit internal linkage.
732 * tree.c (decl_linkage): Only return lk_external if it's set.
735 * decl2.c (constrain_visibility): Ignore the anonymous namespace
736 for extern "C" decls.
737 (VISIBILITY_STATIC): Rename to VISIBILITY_ANON.
739 * decl2.c (constrain_visibility): Remove specified and reason
740 parameters. Don't touch decls that already have explicit visibility.
741 (determine_visibility): Do copy DECL_VISIBILITY_SPECIFIED from
743 (determine_visibility_from_class): Reverse sense of
744 DECL_VISIBILITY_SPECIFIED test for target-specific visibility rules.
745 (constrain_class_visibility): Only complain about member visibility
746 if the member type is another class. Don't change visibility of the
749 2006-07-19 Mark Mitchell <mark@codesourcery.com>
752 * decl.c (layout_var_decl): Don't call push_local_name here.
753 (initialize_artificial_var): Assert artificiality.
754 (cp_finish_decl): Call push_local_name here.
756 2006-07-18 Mark Mitchell <mark@codesourcery.com>
759 * typeck.c (build_binary_op): Short-circuit pointer arithmetic in
762 2006-07-18 Mark Mitchell <mark@codesourcery.com>
765 * semantics.c (check_accessibility_of_qualified_id): Robustify.
768 * pt.c (tsubst_decl): Handling substitutions into a static data
769 member from within the scope of the tempalte itself.
771 2006-07-18 Lee Millward <lee.millward@gmail.com>
774 * method.c (locate_copy): Check for non_reference
775 returning error_mark_node.
778 * decl.c (duplicate_decls): Return error_mark_node
779 on ambiguous declaration.
781 2006-07-18 Steve Ellcey <sje@cup.hp.com>
784 * search.c (adjust_result_of_qualified_name_lookup): Change
785 assert to part of if statement.
787 2006-07-17 Steve Ellcey <sje@cup.hp.com>
790 * decl.c (reshape_init_class): Return error_mark_node on error.
792 2006-07-17 Steve Ellcey <sje@cup.hp.com>
795 * decl2.c (check_classfn): Return NULL_TREE on error.
797 2006-07-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
800 * name-lookup.c (pushdecl_maybe_friend): Return early on
802 * except.c (expand_start_catch_block): Use error_mark_node instead
803 of NULL_TREE for invalid decls.
804 * parser.c (cp_parser_exception_declaration): Return error_mark_node
805 on invalid catch parameter. Simplify.
807 2006-07-16 Jakub Jelinek <jakub@redhat.com>
810 * decl2.c (note_vague_linkage_var): Removed.
811 (finish_static_data_member_decl): Add decl to pending_statics vector
812 directly. Do it even for non-public decls.
814 2006-07-15 Lee Millward <lee.millward@gmail.com>
817 * decl2.c (acceptable_java_type): Robustify. Use
818 proper Boolean return type instead of return 1.
819 (check_java_method): Don't issue error about
820 type not being an acceptable Java parameter if
821 it's error_mark_node.
824 * parser.c (cp_parser_elaborated_type_specifier):
825 Return early if an invalid type was detected.
827 2006-07-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
830 * parser.c (cp_parser_check_decl_spec): New function.
831 (cp_parser_decl_specifier_seq): Factor out check for repeated
832 decl-specifiers into cp_parser_check_decl_spec. Use it.
833 (cp_parser_type_specifier_seq): Use it.
836 * semantics.c (finish_offsetof): Use TREE_OPERAND for COMPONENT_REFs
840 * decl2.c (cplus_decl_attributes): Check for invalid decls.
842 2006-07-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
845 * decl.c (cp_finish_decl): Check asmspec_tree for error_mark_node.
846 * decl2.c (grokfield): Likewise.
848 2006-07-12 Geoffrey Keating <geoffk@apple.com>
850 * decl2.c (determine_visibility): Don't change visibility of
851 function locals because of -fvisibility-inlines-hidden.
853 2006-07-12 Jason Merrill <jason@redhat.com>
856 * semantics.c (note_decl_for_pch): Don't premangle templates.
858 2006-07-12 Martin Michlmayr <tbm@cyrius.com>
860 * typeck.c (string_conv_p): Remove spurious quotation mark in
863 2006-07-07 Lee Millward <lee.millward@gmail.com>
864 Andrew Pinski <pinskia@gmail.com>
867 * decl.c (define_label): Return error_mark_node on error.
868 * semantics.c (finish_label_stmt): Don't call
869 add_stmt for invalid labels.
871 2006-07-06 Jason Merrill <jason@redhat.com>
874 * decl2.c (finish_static_data_member_decl): Don't assert
877 2006-07-05 Jason Merrill <jason@redhat.com>
881 * class.c (check_field_decls): Check TYPE_PACKED after
882 stripping array types.
883 (finish_struct_bits): Don't copy TYPE_SIZE here.
886 * friend.c (is_friend): Fix DR 45 implementation.
888 2006-07-05 Richard Guenther <rguenther@suse.de>
889 Andrew Pinski <pinskia@gcc.gnu.org>
892 * cp-objcp-common.c (cxx_types_compatible_p): Ignore
893 top level qualifiers for pointer type comparisons.
895 2006-07-01 Jason Merrill <jason@redhat.com>
898 * method.c (make_thunk): Unset DECL_USE_TEMPLATE and
901 2006-06-30 Jason Merrill <jason@redhat.com>
904 * call.c (build_new_method_call): Force evaluation of the
905 instance pointer, not the object.
907 2006-06-30 Kazu Hirata <kazu@codesourcery.com>
909 * decl2.c: Fix a comment typo.
911 2006-06-30 Jason Merrill <jason@redhat.com>
914 * decl2.c (grokfield): Only try to treat the decl as an access
915 declaration if the scope is a class.
917 2006-06-29 Jason Merrill <jason@redhat.com>
924 * decl2.c (determine_visibility): Overhaul.
925 (determine_visibility_from_class): Likewise.
926 (min_vis_r, type_visibility, constrain_visibility): New fns.
927 (constrain_visibility_for_template): Likewise.
928 (constrain_class_visibility): Likewise.
929 * decl.c (cp_finish_decl): Call determine_visibility for function
931 * name-lookup.c (pushtag): Call determine_visibility.
932 * decl.c (duplicate_decls): Don't copy visibility from template to
934 * pt.c (check_explicit_specialization): Likewise.
935 (lookup_template_class, tsubst_decl): Call determine_visibility.
936 * class.c (finish_struct_1): Call constrain_class_visibility.
941 * parser.c (cp_parser_explicit_instantiation): Pass the attributes
943 (cp_parser_type_specifier): Allow 'enum __attribute ((...)) E'.
944 (cp_parser_enum_specifier): Likewise.
945 (cp_parser_elaborated_type_specifier): Apply attributes if this
946 declares only the class.
947 (cp_parser_class_specifier): Apply leading attributes immediately.
948 * semantics.c (begin_class_definition): Add attributes parameter,
949 apply them to the type.
953 * tree.c (decl_anon_ns_mem_p): New function.
954 * cp-tree.h: Declare it.
955 * decl2.c (determine_visibility): Make anonymous namespace
957 (min_vis_r, constrain_visibility): Likewise.
958 * rtti.c (create_pseudo_type_info): Set TREE_PUBLIC on
960 * decl.c (cxx_init_decl_processing): Set TREE_PUBLIC on
962 * name-lookup.c (push_namespace_with_attribs): Don't set TREE_PUBLIC
963 on anonymous namespaces.
965 2006-06-28 Jason Merrill <jason@redhat.com>
968 * pt.c (convert_template_argument): Pass all template arguments
969 on to coerce_template_template_parms.
971 2006-06-25 Lee Millward <lee.millward@gmail.com>
972 Mark Mitchell <mark@codesuorcery.com>
975 * decl2.c (grokbitfied): Remove check for grokdeclarator
976 returning NULL_TREE, instead check for error_mark_node
978 * decl.c (grokdeclarator): Adjust block comment.
980 2006-06-25 Lee Millward <lee.millward@gmail.com>
983 * mangle.c (mangle_conv_op_name_for_type): Check for
985 * name-lookup.c (push_class_level_binding): Robustify.
986 (do_class_using_decl): Return early if name is error_mark_node.
988 2006-06-23 Steve Ellcey <sje@cup.hp.com>
991 * name-lookup.c (pushtag): Return if we have error_mark_node.
993 2006-06-23 Steve Ellcey <sje@cup.hp.com>
996 * typeck2.c (process_init_constructor_array): Set ce->value on errors.
998 2006-06-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1001 * parser.c (cp_parser_attribute_list): Skip attributes with invalid
1002 arguments. Fix comment.
1005 * init.c (build_new_1): Handle error_mark_nodes returned by
1006 build_java_class_ref.
1007 (build_java_class_ref): Do not abort compilation, but return
1008 error_mark_node. Improve error message. Fix indentation.
1010 2006-06-23 Danny Smith <dannysmith@users.sourceforge.net>
1013 * decl.c (start_decl): Check that dllimports are not initialized.
1015 2006-06-22 Lee Millward <lee.millward@gmail.com>
1018 * typeck2.c (build_m_component_ref): Use error_operand_p.
1021 * decl.c (grokdeclarator): Return error_mark_node on
1022 invalid uses of the scope resolution operator.
1024 2006-06-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1027 * pt.c (determine_specialization): Check for invalid decls.
1030 * pt.c (unify) <case TEMPLATE_PARM_INDEX>: Check for invalid
1034 * rtti.c (get_tinfo_decl_dynamic): Robustify.
1036 2006-06-20 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1039 * init.c (push_base_cleanups): Skip members with invalid types.
1040 * typeck.c (build_class_member_access_expr): Robustify.
1042 2006-06-19 Mark Mitchell <mark@codesourcery.com>
1044 * pt.c (instantiate_template): Fix typo in comment.
1046 2006-06-19 Richard Guenther <rguenther@suse.de>
1048 * parser.c (CP_LEXER_BUFFER_SIZE): Adjust to assure near
1049 power-of-two token vector size.
1051 2006-06-16 Mark Mitchell <mark@codesourcery.com>
1054 * decl.c (cp_finsh_decl): Do not emit uninstantiated static data
1058 * call.c (standard_conversion): Strip cv-qualifiers from bitfield
1062 * decl.c (have_extern_spec): Remove.
1063 (start_decl): Do not check have_extern_spec.
1064 (start_function): Likewise.
1065 * cp-tree.h (have_extern_spec): Remove.
1066 * parser.c (cp_parser_linkage_specification): Don't set
1068 (cp_parser_init_declarator): Likewise.
1069 (cp_parser_parameter_declaration): Do not treat parameters as
1070 within the scope of an unbraced linkage specification.
1072 2006-06-15 Mark Mitchell <mark@codesourcery.com>
1075 * cp-tree.h (CLASSTYPE_SPECIALIZATION_OF_PRIMARY_TEMPLATE_P): New
1077 * pt.c (unify): Use it.
1080 * call.c (build_conditional_expr): Robustify.
1083 * pt.c (instantiate_template): Set processing_template_decl to
1084 zero while performing substitutions.
1086 2006-06-14 Mark Mitchell <mark@codesourcery.com>
1089 * parser.c (cp_parser_unqualified_id): Use constructor_name_p to
1090 identify destructors.
1091 (cp_parser_nested_name_specifier_opt): Remove invalid
1093 (cp_parser_template_id): Refine heuristic for determining whether
1094 we are entering a scope.
1097 * parser.c (cp_parser_declarator): Robustify.
1100 * pt.c (tsubst_expr): Use finish_omp_atomic.
1101 (value_dependent_expression_p): All CALL_EXPRs are dependent.
1102 * semantics.c (finish_omp_atomic): Rework to use standard
1103 paradigms for handling non-dependent expressions.
1105 2006-06-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
1107 * typeck.c (build_modify_expr): Tidy diagnostic message.
1109 2006-06-14 Mark Mitchell <mark@codesourcery.com>
1112 * typeck.c (build_modify_expr): Disallow array assignment.
1114 2006-06-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
1116 * cp-tree.def: Fix typo.
1118 2006-06-13 Mark Mitchell <mark@codesourcery.com>
1121 * decl.c (decls_match): Allow an extern "C" variable declarations
1122 from different namespaces to match.
1123 (duplicate_decls): Disallow redeclaring a variable with a
1124 different linkage specification.
1126 2006-06-13 Jakub Jelinek <jakub@redhat.com>
1129 * cp-tree.h (cxx_int_tree_map): New struct.
1130 (struct language_function): Add extern_decl_map field.
1131 * name-lookup.c (pushdecl_maybe_friend): Add x -> t mapping
1132 to cp_function_chain->extern_decl_map hash table instead of
1133 copying over DECL_UID.
1134 * cp-gimplify.c (cxx_int_tree_map_eq, cxx_int_tree_map_hash): New
1136 (cp_genericize_r): Remap DECL_EXTERN local decls using
1137 cp_function_chain->extern_decl_map hash table.
1138 * decl.c (finish_function): Clear extern_decl_map.
1140 2006-06-12 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1143 * semantics.c (finish_offsetof): Handle pseudo-destructors.
1146 * name-lookup.c (lookup_qualified_name): Always return error_mark_node
1150 * decl2.c (finish_anon_union): Return early if build_anon_union_vars
1153 2006-06-12 Roger Sayle <roger@eyesopen.com>
1156 * typeck2.c (build_functional_cast): Use cp_convert to construct
1157 non-aggregate initializers instead of the user-level build_c_cast.
1159 2006-06-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1162 * cp-tree.h (finish_offsetof): Add prototype.
1163 * semantics.c (finish_offsetof): New function.
1164 * parser.c (cp_parser_builtin_offsetof): Call it instead of
1166 * pt.c (tsubst_copy_and_build): Likewise.
1168 2006-06-06 Mark Mitchell <mark@codesourcery.com>
1171 * call.c (standard_conversion): Require that the derived type be
1172 complete when performing a derived-to-base conversion.
1174 2006-06-04 Mark Mitchell <mark@codesourcery.com>
1177 * decl.c (cp_finish_decl): Process initializers for static data
1178 members with non-dependent initializers, even in templates.
1181 * decl.c (maybe_deduce_size_from_array_init): If the declaration
1182 is erroneous, give it an erroneous type.
1183 (layout_var_decl): If the type is erroneous, give up.
1184 (check_initializer): Likewise.
1187 * cp-tree.h (TYPE_OBJ_P): New macro.
1188 (TYPE_PTROB_P): Use it.
1189 (TYPE_REF_OBJ_P): Likewise.
1190 * semantics.c (finish_compound_literal): Do not permit compound
1191 literals of non-object types.
1194 * typeck.c (original_type): Robustify.
1196 2006-06-05 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1199 * init.c (constant_value_1): Return decl instead of error_mark_node
1200 for invalid initializers.
1202 2006-06-01 Andrew Pinski <pinskia@physics.uc.edu>
1205 * rtti.c (build_dynamic_cast_1): Call c_common_truthvalue_conversion
1206 on operand of the COND_EXPR for the null pointer check.
1208 2006-06-01 Andrew Pinski <pinskia@physics.uc.edu>
1211 * typeck.c (build_unary_op): Mark the function as being used.
1213 2006-06-01 Alexandre Oliva <aoliva@redhat.com>
1216 * parser.c (cp_parser_initial_pragma): Read one more token for
1217 caller after reading PCH file in.
1219 2006-05-31 Mark Mitchell <mark@codesourcery.com>
1222 * call.c (perform_implicit_conversion): Do not actually perform
1223 conversions in templates.
1226 * call.c (resolve_args): Check for invalid uses of bound
1227 non-static member functions.
1228 * init.c (build_offset_ref): Return error_mark_node for errors.
1231 * decl.c (reshape_init): Robustify.
1232 (reshape_init_array_1): Likewise.
1234 2006-05-30 Mark Mitchell <mark@codesourcery.com>
1237 * parser.c (cp_parser_decl_specifier_seq): Issue errors about
1238 "friend" specifiers that do not appear in class scopes.
1241 * class.c (check_bitfield_decl): Ensure that all bitfields have
1244 2006-05-29 Kazu Hirata <kazu@codesourcery.com>
1246 * pt.c (convert_nontype_argument): Fix a typo in an error
1249 2006-05-28 Kazu Hirata <kazu@codesourcery.com>
1251 * decl.c, decl2.c, parser.c: Fix comment typos. Follow
1252 spelling conventions.
1254 2006-05-24 Mark Mitchell <mark@codesourcery.com>
1257 * decl.c (cp_make_fname_decl): Don't set DECL_INITIAL to
1258 error_mark_node to indicate an initialization is OK.
1259 (start_decl): Likewise. Adjust call to start_decl_1.
1260 (start_decl_1): Add initialized parameter. Simplify.
1261 * except.c (initialize_handler_parm): Adjust call to
1263 (expand_start_catch_block): Let cp_finish_decl initialize catch
1265 * cp-tree.h (start_decl_1): Adjust prototype.
1266 * pt.c (tsubst_expr): Don't set DECL_INITIAL to error_mark_node.
1267 (instantiate_decl): Let cp_finish_decl handle initialization.
1268 * semantics.c (finish_compound_literal): Create a temporary
1269 variable for the literal.
1270 * typeck.c (build_unary_op): Remove COMPOUND_LITERAL_P special
1272 * decl2.c (finish_static_data_member_decl): Don't set
1274 (grokfield): Do not try to initialize functions.
1276 2006-05-23 Mark Mitchell <mark@codesourcery.com>
1279 * pt.c (determine_specialization): Disallow partial
1280 specializations of templates.
1282 2006-05-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1285 * typeck.c (build_modify_expr): Test arguments for error_operand_p.
1287 * decl.c (grokdeclarator): Return error_mark_node instead of NULL_TREE.
1289 2006-05-21 Mark Mitchell <mark@codesourcery.com>
1292 * cp-tree.h (cp_save_expr): New function.
1293 * init.c (build_new): Correct logic for zero-element array
1294 warning. Use cp_save_expr.
1295 * tree.c (cp_save_expr): New function.
1297 2006-05-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1300 * decl.c (grokdeclarator): Return error_mark_node instead of NULL_TREE
1303 2006-05-19 Mike Stump <mrs@apple.com>
1305 * typeck.c (default_conversion): Remove static.
1307 2006-05-19 Mark Mitchell <mark@codesourcery.com>
1310 * cp-tree.h (begin_function_try_block): Change prototype.
1311 (finish_function_handler_sequence): Likewise.
1312 * parser.c (cp_parser_function_try_block): Adjust calls.
1313 * pt.c (tsubst_expr): Adjust calls.
1314 * semantics.c (begin_function_try_block): Create an artificial
1316 (finish_function_handler_sequence): Close it.
1318 2006-05-18 Mark Mitchell <mark@codesourcery.com>
1322 * typeck.c (decay_conversion): Convert bitfields to their declared
1323 types here. Improve documentation. Avoid use of cp_convert.
1324 (default_conversion): Make it static. Perform integral promotions
1325 before lvalue-to-rvalue, function-to-pointer, and array-to-pointer
1327 * init.c (build_init): Remove.
1328 (expand_default_init): Do not call rvalue.
1329 * call.c (null_ptr_cst_p): Robustify.
1330 (build_conditional_expr): Tidy.
1331 * except.c (build_throw): Do not perform lvalue-to-rvalue
1332 conversion on operand before initializing temporary.
1333 * tree.c (convert.h): Include it.
1334 (convert_bitfield_to_declared_type): Use convert_to_integer, not
1336 (rvalue): Don't convert bitfields to their declared type here.
1337 * cp-tree.h (build_init): Remove.
1338 (default_conversion): Likewise.
1339 * typeck2.c (build_m_component_ref): Do not perform
1340 lvalue-to-rvalue, function-to-pointer, or array-to-pointer
1341 conversions here. Correct error message.
1343 2006-05-17 Mark Mitchell <mark@codesourcery.com>
1346 * decl2.c (check_member_template): Remove checks for virtual
1348 * parser.c (cp_parser_function_specifier_opt): Complain about
1350 (cp_parser_pure_specifier): Likewise.
1353 * parser.c (cp_parser_set_storage_class): Check for
1354 invalid uses of storage classes on unbraced linkage
1356 (cp_parser_decl_specifier_seq): Pass keywords, not storage classes,
1357 to cp_parser_set_storage_class.
1359 2006-05-17 Jakub Jelinek <jakub@redhat.com>
1362 * semantics.c (finish_compound_literal): Only set TREE_HAS_CONSTRUCTOR
1366 * parser.c (cp_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
1367 on combined parallel workshare constructs.
1368 * pt.c (tsubst_expr): Copy OMP_PARALLEL_COMBINED flag.
1370 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
1373 * Make-lang.in (GXX_OBJS): Replace gcc.o with $(GCC_OBJS).
1375 2006-05-15 Mark Mitchell <mark@codesourcery.com>
1378 * cp-tree.h (perform_access_checks): New function.
1379 * semantics.c (perform_access_checks): New function.
1380 (perform_deferred_access_checks): Use it.
1381 * parser.c (cp_parser_simple_declaration): Adjust call to
1382 cp_parser_init_declarator.
1383 (cp_parser_type_parameter): Do not defer checks in default
1385 (cp_parser_explicit_specialization): Adjust call to
1386 cp_parser_single_declaration.
1387 (cp_parser_init_declarator): Perform template-parameter access
1389 (cp_parser_parameter_declaration): Do not defer checks for
1390 template parameter default arguments.
1391 (cp_parser_template_declaration_after_export): Gather access
1392 checks for template parameters, and pass them to
1393 cp_parser_single_declaration.
1394 (cp_parser_template_parameter_access_checks): New function.
1395 (cp_parser_single_declaration): Add checks parameter.
1398 * call.c (convert_like_real): Convert bitfields to their declared
1399 types when forming an rvalue.
1400 * tree.c (convert_bitfield_to_declared_type): New function.
1402 * cp-tree.h (convert_bitfield_to_declare_type): Declare it.
1404 2006-05-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1407 * pt.c (any_dependent_template_arguments_p): Return early on invalid
1411 * search.c (adjust_result_of_qualified_name_lookup): Skip on
1412 invalid context_class.
1415 * pt.c (do_decl_instantiation): Return early on invalid decl.
1418 * pt.c (push_template_decl_real): Return error_mark_node instead
1422 * pt.c (tsubst_friend_class): Return early on invalid friend
1425 2006-05-14 H.J. Lu <hongjiu.lu@intel.com>
1427 * Make-lang.in (cp/decl.o): Add dependency on $(TARGET_H).
1428 (cp/decl2.o): Likewise.
1429 (cp/typeck.o): Likewise.
1430 (cp/cvt.o): Likewise.
1431 (cp/parser.o): Likewise.
1432 (cp/call.o): Replace target.h with $(TARGET_H).
1434 2006-05-14 Alexandre Oliva <aoliva@redhat.com>
1436 * pt.c (build_non_dependent_expr): Leave ADDR_EXPR of
1437 COMPONENT_REF alone.
1439 2006-05-11 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1442 * decl.c (copy_fn_p): Return early on non-member functions.
1444 2006-05-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1447 * decl2.c (build_memfn_type): Skip invalid functions and class types.
1449 2006-05-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1452 * pt.c (convert_nontype_argument): Return early on invalid arguments.
1454 * pt.c (process_template_parm): Remove superfluous temporary.
1457 * pt.c (process_template_parm): Handle erroneous non-type parameters.
1460 * typeck.c (convert_for_initialization): Skip erroneous types.
1463 * typeck.c (convert_arguments): Return early on args with
1466 2006-05-03 Aldy Hernandez <aldyh@redhat.com>
1469 * typeck.c (build_static_cast_1): Save casted types in used types
1471 (build_reinterpret_cast_1): Same.
1472 * rtti.c (build_dynamic_cast_1): Same.
1474 2006-05-04 Jakub Jelinek <jakub@redhat.com>
1477 * parser.c (cp_parser_omp_for_loop): Only call
1478 cp_parser_abort_tentative_parse if cp_parser_parse_definitely was not
1481 2006-05-02 Mark Mitchell <mark@codesourcery.com>
1484 * decl.c (grokdeclarator): Robustify checks for defining members
1485 of incomplete types.
1488 * class.c (add_method): Call grok_special_member_properties.
1489 * decl.c (grokdeclarator): Don't call it here.
1490 (copy_fn_p): A TEMPLATE_DECL is never a copy constructor or
1491 assignment operator. Set TYPE_HAS_CONSTURCTOR if DECL is a
1493 (start_method): Don't call grok_special_member_properties.
1494 * method.c (implicitly_declare_fn): Likewise.
1495 * pt.c (instantiate_class_template): Likewise.
1496 * decl2.c (grokfield): Likewise.
1498 2006-05-02 Jakub Jelinek <jakub@redhat.com>
1501 * cp-gimplify.c (cxx_omp_privatize_by_reference): New function.
1502 * cp-tree.h (cxx_omp_privatize_by_reference): New prototype.
1503 * cp-objcp-common.h (LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Define.
1505 2006-04-30 Mark Mitchell <mark@codesourcery.com>
1508 * pt.c (tsubst_default_argument): Increment function_depth around
1509 call to tsubst_expr.
1510 * parser.c (cp_parser_parameter_declaration): Likewise.
1511 * decl2.c (mark_used): Tidy.
1513 2006-04-30 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1516 * decl.c (grok_op_properties): Skip operators with invalid args
1517 when checking for class-type or enum-type args.
1519 2006-04-29 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1522 * decl.c (copy_fn_p): Skip functions with invalid first arg.
1524 2006-04-27 Mark Mitchell <mark@codesourcery.com>
1527 * tree.c (rvalue): Convert bitfields to their declared types.
1530 * typeck2.c (cxx_incomplete_type_diagnostic): Handle
1533 2006-04-24 Mark Mitchell <mark@codesourcery.com>
1536 * typeck.c (decay_conversion): Don't adjust bitfield types.
1537 (perform_integral_promotions): Treat bitfield enums as enums, not
1538 as short integer types.
1539 * tree.c (rvalue): Convert bitfields to their correct types.
1541 2006-04-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1544 * class.c (layout_class_type): Skip fields with invalid types.
1546 2006-04-23 Mark Mitchell <mark@codesourcery.com>
1549 * cp-tree.h (build_this_parm): Declare.
1550 (grok_method_quals): Remove.
1551 (build_memfn_type): Declare.
1552 (build_artificial_parm): Declare.
1553 (do_friend): Remove quals parameter.
1554 * decl.c (build_this_parm): New function.
1555 (grokfndecl): Use it. Do not pass quals to grokclassfn.
1556 (grokdeclarator): Rename quals to memfn_quals. Avoid allocating
1557 unnecessary TYPE_DECLs. Correct qualification of member function
1559 * method.c (implicitly_declare_fn): Use build_this_parm.
1560 * friend.c (do_friend): Remove quals parameter.
1561 * decl2.c (grok_method_quals): Remove.
1562 (build_memfn_type): New function.
1563 (build_artificial_parm): Give it external linkage.
1564 (grokclassfn): Remove quals parameter. Do not build "this"
1568 * cp-tree.h (is_bitfield_expr_with_lowered_type): New function.
1569 * typeck.c (is_bitfield_expr_with_lowered_type): New function.
1570 (decay_conversion): Convert bitfield expressions to the correct
1572 (build_modify_expr): Remove spurious conversions.
1573 * class.c (layout_class_type): Modify the type of bitfields to
1574 indicate a limited range.
1575 * call.c (standard_conversion): Adjust the type of bitfield
1576 expressions used in an rvalue context.
1577 (build_conditional_expr): Likewise.
1579 2006-04-22 Kazu Hirata <kazu@codesourcery.com>
1581 * decl.c: Fix comment typos.
1583 2006-04-21 Eric Christopher <echristo@apple.com>
1585 * decl.c: Fix typo in function name.
1587 2006-04-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1590 * parser.c (cp_parser_class_name): Check for invalid typenames.
1594 * pt.c (tsubst_friend_function): Return early if
1595 pushdecl_namespace_level fails.
1598 * typeck.c (convert_arguments): Return error_mark_node instead of
1600 * cp-tree.h (error_mark_list): Remove declaration.
1601 * decl.c (error_mark_list): Remove definition.
1602 (cxx_init_decl_processing): Do not initialize error_mark_list.
1605 * rtti.c (build_dynamic_cast_1): Check for invalid conversions
1606 before calling convert_to_reference.
1607 * cvt.c (convert_to_reference): Assert that reftype is a
1610 2006-04-19 Mark Mitchell <mark@codesourcery.com>
1613 * class.c (currently_open_class): Tidy.
1614 * decl.c (grokdeclarator): If we encounter an erroneous
1615 declarator, assume that we have already issued an error message
1616 and return. Return error_mark_node instead of NULL_TREE in more
1617 places. Issue errors about function definitions that do not have
1618 a function declarator. Check for complete types for all function
1620 * cp-tree.h (cp_error_declarator): Remove.
1621 (currently_open_class): Change return type.
1622 * parser.c (cp_parser_id_expression): Add optional_p parameter.
1623 (cp_parser_parse_diagnose_invalid_type_name): Adjust calls.
1624 (cp_parser_id_expression): Likewise.
1625 (cp_parser_unqualified_id): If the name is optional, return
1627 (cp_parser_postfix_dot_deref_expression): Adjust calls.
1628 (cp_parser_type_parameter): Likewise.
1629 (cp_parser_unqualified_id): Likewise.
1630 (cp_parser_direct_declarator): Likewise.
1631 (cp_parser_declarator_id): Add optional_p parameter.
1632 (cp_parser_function_definition_from_specifiers_and_declarator):
1633 Assume that start_function indicates failure only if it has issued
1635 (cp_parser_omp_var_list_no_open): Adjust calls.
1637 2006-04-17 Janis Johnson <janis187@us.ibm.com>
1639 PR c++/26114, c++/26115
1640 * typeck.c (cxx_mark_addressable): Restore check for extra_warnings.
1641 * class.c (check_field_decls): Ditto.
1643 2006-04-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1645 * init.c (build_offset_ref): Remove superfluous temporary.
1647 2006-04-16 Mark Mitchell <mark@codesourcery.com>
1650 * typeck.c (finish_class_member_access_expr): Robustify
1652 2006-04-15 Kazu Hirata <kazu@codesourcery.com>
1654 * Make-lang.in (cp/pt.o): Depend on vecprim.h.
1655 * pt.c: Include vecprim.h.
1656 (inline_parm_levels): Change the type to VEC(int,heap) *.
1657 (inline_parm_levels_used): Remove.
1658 (maybe_begin_member_template_processing,
1659 maybe_end_member_template_processing): Use VEC instead of
1662 * cp/call.c: Fix comment typos.
1664 2006-04-12 Mark Mitchell <mark@codesourcery.com>
1666 * parser.c (cp_parser_init_declarator): Initialize local variables
1669 2006-04-12 Roger Sayle <roger@eyesopen.com>
1671 * parser.c (cp_parser_init_declarator): Initialise
1672 is_parenthesized_init to false to avoid compiler warning.
1674 2006-04-11 Mark Mitchell <mark@codesourcery.com>
1676 * cp-tree.h (build_operator_new_call): Adjust prototype.
1677 (build_new_method_call): Likewise.
1678 (build_op_delete_call): Likewise.
1679 * init.c (build_raw_new_expr): New function.
1680 (build_new_1): Pass information as parameters, rather than
1681 bundling it into a NEW_EXPR.
1682 (build_new): Adjust accordingly.
1683 (build_vec_delete_1): Adjust for changes to build_op_delete_call.
1684 (build_delete): Likewise.
1685 * decl.c (finish_destructor_body): Likewise.
1686 * call.c (build_operator_new_call): Return the allocation function
1688 (build_op_delete_call): Take allocation function as parameter.
1689 (build_special_member_call): Adjust call to build_new_method_call.
1690 (build_new_method_call): Return function called.
1691 * pt.c (tsubst_copy_and_build): Adjust call to
1692 build_new_method_call.
1693 * semantics.c (finish_call_expr): Likewise.
1694 * parser.c (cp_parser_postfix_expression): Likewise.
1695 * typeck2.c (cxx_incomplete_type_diagnostic): Refer to
1696 "incomplete", not "undefined", types.
1699 * decl.c (grokdeclarator): Remove namespace-handling code for
1700 pointers-to-members.
1701 * parser.c (cp_parser_ptr_operator): Check for qualified names
1705 * parser.c (cp_parser_init_declarator): Adjust logic for deciding
1706 whether or not to look for a pure-specifier.
1707 (cp_parser_member_declaration): Likewise.
1709 2006-04-08 Kazu Hirata <kazu@codesourcery.com>
1711 * decl2.c, pt.c, semantics.c: Fix comment typos.
1713 2006-04-06 Roger Sayle <roger@eyesopen.com>
1715 * call.c (null_ptr_cst_p): Add explicit TREE_CONSTANT_OVERFLOW check.
1717 2006-04-05 Jason Merrill <jason@redhat.com>
1719 * name-lookup.c (push_namespace_with_attribs): Temporarily disable
1720 default hidden visibility for anonymous namespace.
1722 2006-03-29 Roger Sayle <roger@eyesopen.com>
1725 * init.c (build_vec_delete_1): Convert BASE pointer's type to
1726 the base pointer type to avoid a type mismatch in the EQ_EXPR.
1728 2006-03-24 Carlos O'Donell <carlos@codesourcery.com>
1730 * search.c (maybe_suppress_debug_info): If
1731 flag_emit_class_debug_always then don't suppress.
1733 2006-03-22 Jason Merrill <jason@redhat.com>
1735 * name-lookup.c (push_namespace_with_attribs): Only apply hidden
1736 visibility to anonymous namespaces if HAVE_GAS_HIDDEN.
1738 2006-03-21 Jakub Jelinek <jakub@redhat.com>
1741 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle default arguments.
1743 2006-03-21 Jason Merrill <jason@redhat.com>
1746 * parser.c (cp_parser_declaration): Support attributes on
1747 anonymous namespaces.
1748 * name-lookup.c (push_namespace_with_attribs): Anonymous
1749 namespaces default to hidden visibility.
1751 2006-03-20 Jason Merrill <jason@redhat.com>
1753 PR c++/21764, c++/19238
1754 * decl.c (cp_finish_decl): Call determine_visibility later.
1755 (start_preparsed_function): Likewise.
1756 * cp-tree.h (CP_TYPE_CONTEXT, TYPE_NAMESPACE_SCOPE_P): New macros.
1757 (TYPE_CLASS_SCOPE_P, TYPE_FUNCTION_SCOPE_P): New macros.
1758 * name-lookup.h (struct cp_binding_level): Add has_visibility
1760 * name-lookup.c: Include c-pragma.h.
1761 (push_namespace_with_attribs): Split out from push_namespace.
1762 Push visibility if appropriate. Set TREE_PUBLIC on namespaces.
1763 (leave_scope): Pop visibility if appropriate.
1764 * decl2.c (determine_visibility_from_class): Split out from...
1765 (determine_visibility): ...here. Handle function scope and
1767 (import_export_decl): Move visibility handling to
1768 determine_visibility_from_class.
1769 * parser.c (cp_parser_declaration, cp_parser_namespace_name): Allow
1770 attributes on namespace declarations.
1772 2006-03-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1775 * decl.c (grokdeclarator): Do not accept long long double.
1776 Reorganize checks for invalid (combinations of) type modifiers.
1777 Quote modifiers in messages.
1779 2006-03-09 Jason Merrill <jason@redhat.com>
1781 PR c++/16387, c++/16389
1782 * typeck.c (cxx_alignof_expr, cxx_sizeof_expr): New functions.
1783 (cxx_sizeof_or_alignof_expr): Split out from here.
1785 2006-03-09 Diego Novillo <dnovillo@redhat.com>
1787 Merge from gomp-20050608-branch
1789 2006-02-02 Diego Novillo <dnovillo@redhat.com>
1791 * decl.c (pop_labels_1): Use appropriate pointer casting.
1792 (poplevel_named_label_1): Likewise.
1793 (named_label_entry_hash): Likewise.
1794 (named_label_entry_eq): Likewise.
1795 (check_goto): Likewise.
1796 (define_label): Likewise.
1798 2006-01-26 Diego Novillo <dnovillo@redhat.com>
1800 * cp-tree.h (CP_OMP_CLAUSE_INFO): Use TREE_TYPE instead
1802 * pt.c: Use OMP_CLAUSE_CODE and OMP_CLAUSE_OPERAND
1803 instead of TREE_CODE/TREE_OPERAND.
1804 * semantics.c: Likewise.
1805 * parser.c: Likewise.
1807 2005-11-10 Diego Novillo <dnovillo@redhat.com>
1809 * parser.c (cp_parser_omp_threadprivate): Emit diagnostic if
1810 target does not support TLS.
1812 2005-11-09 Jakub Jelinek <jakub@redhat.com>
1814 * decl.c (redeclaration_error_message): Don't error about
1815 DECL_THREAD_LOCAL_P mismatches if CP_DECL_THREADPRIVATE_P
1818 2005-11-08 Jakub Jelinek <jakub@redhat.com>
1821 * semantics.c (finish_omp_barrier, finish_omp_flush): New
1823 * parser.c (cp_parser_omp_barrier): Call finish_omp_barrier.
1824 (cp_parser_omp_flush): Call finish_omp_flush.
1825 * cp-tree.h (finish_omp_barrier, finish_omp_flush): New
1829 * pt.c (tsubst_expr): Handle OMP_MASTER and OMP_ORDERED.
1831 2005-11-03 Jakub Jelinek <jakub@redhat.com>
1833 * semantics.c (finish_omp_threadprivate): Error on class-scope
1836 2005-11-02 Jakub Jelinek <jakub@redhat.com>
1838 * parser.c (cp_parser_omp_all_clauses): If some clause
1839 type is not allowed, don't remove just one of the
1840 clauses, but all clauses added in that loop round.
1842 * semantics.c (finish_omp_clauses): Fix function
1843 comment. Don't handle non-const or mutable specially,
1844 as const and not mutable is predetermined shared and
1845 that leads to double error. Don't ICE if copyin var is
1849 * parser.c (cp_parser_pragma): Diagnose
1850 PRAGMA_OMP_SECTION outside of PRAGMA_OMP_SECTIONS
1853 * semantics.c (finish_omp_threadprivate): Error if V
1854 is automatic variable or has incomplete type.
1856 2005-11-01 Diego Novillo <dnovillo@redhat.com>
1858 * parser.c (cp_parser_omp_all_clauses): Use
1859 OMP_CLAUSE_CHAIN instead of TREE_CHAIN.
1861 2005-11-01 Diego Novillo <dnovillo@redhat.com>
1863 * parser.c (cp_parser_omp_all_clauses): When emitting an
1864 error message, remove the invalid clause from the list.
1866 2005-10-31 Diego Novillo <dnovillo@redhat.com>
1868 * parser.c (cp_parser_omp_parallel): Do not allow 'nowait' in
1869 combined parallel+workshare directives.
1871 2005-10-31 Richard Henderson <rth@redhat.com>
1873 * cp-objcp-common.h (LANG_HOOKS_OMP_CLAUSE_DTOR):
1874 Use cxx_omp_clause_dtor.
1875 * cp-tree.h (CP_OMP_CLAUSE_INFO): New.
1876 (cxx_omp_clause_dtor): New.
1877 * cp-gimplify.c (cxx_omp_clause_apply_fn): New.
1878 (cxx_omp_clause_default_ctor): Use it.
1879 (cxx_omp_clause_copy_ctor, cxx_omp_clause_assign_op):
1881 (cxx_omp_clause_dtor): New.
1882 * semantics.c (finish_omp_clauses): Rewrite cdtor
1883 checking to fill in CP_OMP_CLAUSE_INFO. Don't
1884 specialcase LASTPRIVATE for removal.
1885 (cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor,
1886 cxx_omp_clause_assign_op): Move to cp-gimplify.c.
1888 2005-10-28 Jakub Jelinek <jakub@redhat.com>
1890 * semantics.c (finish_omp_threadprivate): If
1891 DECL_RTL_SET_P, call make_decl_rtl again so that
1892 encode_section_info can update SYMBOL_REF's flags.
1894 2005-10-26 Jakub Jelinek <jakub@redhat.com>
1896 * semantics.c (finish_omp_for): Don't segfault if COND
1897 or INCR is NULL. If not calling c_finish_omp_for
1898 right away and one of COND and INCR is NULL, issue
1899 error and don't expand anything.
1902 * cp-tree.h (finish_omp_for): Add PRE_BODY argument.
1903 * semantics.c (finish_omp_for): Likewise. Set
1904 OMP_FOR_PRE_BODY to PRE_BODY if deferring, add it
1905 into the current statement list if not processing
1906 template decl or pass it to c_finish_omp_for.
1908 * parser.c (cp_parser_omp_for_loop): Expand optional DECL_EXPRs
1909 into PRE_BODY statement list. Pass it to finish_omp_for.
1910 * pt.c (tsubst_expr) <case OMP_FOR>: tsubst_expr also
1911 OMP_FOR_PRE_BODY into PRE_BODY stmt list, pass it to
1912 finish_omp_for. Put all the statements into sk_omp
1915 2005-10-25 Jakub Jelinek <jakub@redhat.com>
1918 * parser.c (struct cp_parser): Rename in_iteration_statement
1919 field to in_statement.
1920 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
1921 (IN_OMP_BLOCK, IN_OMP_FOR): Change values.
1922 (cp_parser_new, cp_parser_begin_omp_structured_block,
1923 cp_parser_end_omp_structured_block,
1924 cp_parser_omp_for_loop): Adjust for
1925 in_iteration_statement renaming.
1926 (cp_parser_selection_statement): Save
1927 parser->in_iteration, or it temporarily with
1928 IN_SWITCH_STMT for the
1929 cp_parser_implicitly_scoped_statement call.
1930 (cp_parser_iteration_statement): Adjust for
1931 in_iteration_statement renaming. Use
1932 IN_ITERATION_STMT rather than true.
1933 (cp_parser_jump_statement): Adjust for
1934 in_iteration_statement renaming and new values. Don't
1935 error on break in a switch statement within OMP_FOR or
1936 OpenMP structured block.
1939 * parser.c (cp_parser_cache_group): Don't stop if next
1940 token is CPP_PRAGMA_EOL and end is CPP_PRAGMA_EOL as
1941 well. If current token is CPP_PRAGMA, consume
1942 everything until CPP_PRAGMA_EOL inclusive.
1944 2005-10-24 Jakub Jelinek <jakub@redhat.com>
1947 * semantics.c (finish_omp_for): Handle MODOP_EXPR in
1948 addition to MODIFY_EXPR.
1950 2005-10-23 Richard Henderson <rth@redhat.com>
1952 * cp-gimplify.c (struct cp_gimplify_ctx): Remove.
1954 (begin_bc_block, finish_bc_block): Use it.
1955 (push_context, pop_context): Remove.
1956 (cp_genericize): Don't use them. Assert bc_label is null.
1957 * semantics.c (finish_omp_clauses): Create a fake data
1958 element of TYPE for probing ctors.
1960 2005-10-23 Richard Henderson <rth@redhat.com>
1962 * cp-objcp-common.h (LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR): New.
1963 (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR): New.
1964 (LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): New.
1965 (LANG_HOOKS_OMP_CLAUSE_DTOR): New.
1966 * semantics.c (finish_omp_clauses): Look through
1967 arrays when looking up special member calls. Also
1968 remove FIRSTPRIVATE when LASTPRIVATE fails.
1969 (cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor): New.
1970 (cxx_omp_clause_assign_op): New.
1971 * cp-tree.h: Declare them.
1973 2005-10-21 Richard Henderson <rth@redhat.com>
1975 * decl.c (check_previous_goto_1): Return false if error.
1976 (check_switch_goto): Likewise.
1977 (finish_case_label): Don't emit the case label on error.
1978 * parser.c (struct cp_parser): Revert
1979 in_switch_statement_p changes.
1980 (cp_parser_labeled_statement,
1981 cp_parser_selection_statement): Likewise.
1982 (cp_parser_begin_omp_structured_block): Don't save...
1983 (cp_parser_end_omp_structured_block): or restore
1984 in_switch_statement_p.
1986 2005-10-21 Richard Henderson <rth@redhat.com>
1988 * semantics.c (finish_omp_threadprivate): Set
1989 decl_flags.u2sel when necessary.
1991 2005-10-21 Richard Henderson <rth@redhat.com>
1993 * decl.c (poplevel_named_label_1): Restore creation of the
1995 (decl_jump_unsafe): Check for error_mark_node types.
1996 (check_goto): Don't check cdtor_label. Don't use identify_goto.
1997 * semantics.c (finish_return_stmt): Do check_omp_return before
1998 converting to cdtor_label goto.
2000 2005-10-21 Richard Henderson <rth@redhat.com>
2003 * decl.c (check_omp_return): Return false on error.
2004 * cp-tree.h (check_omp_return): Update decl.
2005 * semantics.c (finish_return_stmt): Avoid adding
2008 2005-10-21 Richard Henderson <rth@redhat.com>
2010 * cp-tree.h (struct language_function): Remove
2012 Change x_named_labels to a hashtable.
2013 (check_omp_return): Declare.
2014 * decl.c (struct named_label_use_entry): Rename from
2015 named_label_use_list. Remove label_decl.
2016 (struct named_label_entry): Rename from
2017 named_label_list. Remove old_value and next. Change
2018 in_try_scope and in_catch_scope to bool. Add
2020 (pop_labels_1): New.
2021 (pop_labels): Use it.
2022 (pop_local_label, poplevel_named_label_1): New.
2023 (poplevel): Use them.
2024 (named_label_entry_hash, named_label_entry_eq): New.
2025 (make_label_decl): Create named_labels. Move label
2026 creation bits from lookup_label.
2027 (declare_local_label): Tidy.
2028 (identify_goto): Split out from ...
2029 (check_previous_goto_1): Add exited_omp argument.
2032 (use_label): Merge into...
2033 (check_goto): ... here. Handle omp scopes.
2034 (check_omp_return): New.
2035 (check_previous_gotos): Merge into...
2036 (define_label): ... here.
2037 (save_function_data): Remove x_named_label_uses reference.
2038 (finish_function): Likewise.
2039 * name-lookup.h (sk_omp): New.
2040 * name-lookup.c (begin_scope): Handle it.
2041 * parser.c (cp_parser_omp_for): Don't create extra
2044 (cp_parser_omp_sections): Likewise.
2045 * semantics.c (finish_return_stmt): Call check_omp_return.
2046 (begin_omp_structured_block): Use sk_omp.
2047 (finish_omp_structured_block): Use do_poplevel. Don't build a
2048 MUST_NOT_THROW expression here.
2049 (begin_omp_parallel, finish_omp_parallel): Don't create extra
2050 compound statements.
2052 2005-10-21 Diego Novillo <dnovillo@redhat.com>
2055 * cp/cp-tree.h (struct lang_decl_flags): Add field
2057 (CP_DECL_IS_THREADPRIVATE): Define.
2058 * cp/semantics.c (finish_omp_threadprivate): Set. Do
2059 not error out if CP_DECL_IS_THREADPRIVATE is set
2061 * cp/decl.c (duplicate_decls): Merge
2062 CP_DECL_THREADPRIVATE_P.
2064 2005-10-20 Richard Henderson <rth@redhat.com>
2066 * cp-gimplify.c (cp_gimplify_omp_for): New.
2067 (cp_gimplify_expr): Call it.
2068 * cp-tree.h (OMP_FOR_GIMPLIFYING_P): New.
2069 * parser.c (struct cp_parser): Rename
2070 in_iteration_statement_p to in_iteration_statement and
2071 change to unsigned char. Similarly with
2072 in_switch_statement. Update all users.
2073 (IN_OMP_BLOCK, IN_OMP_FOR): New.
2074 (cp_parser_labeled_statement): Diagnose case labels
2075 binding closer to an openmp block nested than the
2077 (cp_parser_jump_statement): Diagnose break and
2078 continue labels binding closer to an openmp block than
2079 an iteration or switch.
2080 (cp_parser_omp_for_loop): Mark in_iteration_statement
2082 (cp_parser_begin_omp_structured_block): New.
2083 (cp_parser_end_omp_structured_block): New.
2084 (cp_parser_omp_structured_block): Use them.
2085 (cp_parser_omp_for, cp_parser_omp_sections_scope): Likewise.
2086 (cp_parser_omp_parallel): Likewise.
2088 2005-10-20 Richard Henderson <rth@redhat.com>
2090 * semantics.c (begin_omp_structured_block): New.
2091 (finish_omp_structured_block): New.
2092 (begin_omp_parallel, finish_omp_parallel): Use them.
2093 * parser.c (cp_parser_omp_structured_block): Likewise.
2094 (cp_parser_omp_for): Likewise.
2095 (cp_parser_omp_sections_scope): Likewise.
2096 * cp-tree.h: Declare them.
2098 2005-10-20 Richard Henderson <rth@redhat.com>
2100 * parser.c (cp_parser_omp_master): Return the statement.
2101 (cp_parser_omp_ordered): Likewise.
2102 (cp_parser_omp_construct): Set the locus for them.
2104 2005-10-19 Richard Henderson <rth@redhat.com>
2106 * semantics.c (finish_omp_atomic): Revert to
2107 uses_template_parms.
2109 2005-10-19 Richard Henderson <rth@redhat.com>
2111 * semantics.c (finish_omp_clauses): Avoid
2112 DECL_THREAD_LOCAL_P on a PARM_DECL. Remove some
2113 stub asserts guaranteed to fail.
2115 2005-10-19 Richard Henderson <rth@redhat.com>
2117 * cp-tree.h (OMP_ATOMIC_DEPENDENT_P, OMP_ATOMIC_CODE): New.
2118 (finish_omp_clauses, finish_omp_for, finish_omp_atomic): New.
2119 * parser.c (cp_parser_omp_clause_copyin): Remove.
2120 (cp_parser_omp_all_clauses): Use cp_parser_omp_var_list instead.
2121 Call finish_omp_clauses.
2122 (cp_parser_omp_clause_if): Don't do error checking here.
2123 (cp_parser_omp_clause_num_threads): Likewise.
2124 (cp_parser_omp_clause_schedule): Likewise.
2125 (cp_parser_omp_atomic): Use finish_omp_atomic.
2126 (cp_parser_omp_for_loop): Don't discard DECL_EXPR.
2127 Don't decompose assignment statment here. Use
2130 * pt.c (tsubst_omp_clauses): New.
2131 (tsubst_expr): Handle OMP_PARALLEL, OMP_FOR, OMP_SECTIONS,
2132 OMP_SINGLE, OMP_SECTION, OMP_CRITICAL, OMP_ATOMIC.
2133 * semantics.c (finish_omp_clauses): New.
2134 (begin_omp_parallel, finish_omp_parallel): Know Less about the
2135 internals of the stmt_list stack.
2136 (finish_omp_for, finish_omp_atomic): New.
2138 2005-10-18 Jakub Jelinek <jakub@redhat.com>
2140 * semantics.c (cxx_omp_predetermined_sharing): New function.
2141 * cp-tree.h (cxx_omp_predetermined_sharing): New prototype.
2143 (LANG_HOOKS_OMP_PREDETERMINED_SHARING): Redefine.
2145 2005-10-18 Richard Henderson <rth@redhat.com>
2147 * parser.c (cp_parser_omp_single): Use make_node and accessors
2150 2005-10-17 Richard Henderson <rth@redhat.com>
2152 * parser.c (cp_parser_omp_for_loop): Handle declarations.
2154 2005-10-12 Richard Henderson <rth@redhat.com>
2156 * Make-lang.in (CXX_C_OBJS): Add c-omp.o.
2157 * cp-tree.h (begin_omp_parallel, finish_omp_parallel): Declare.
2158 (finish_omp_threadprivate): Declare.
2159 * parser.c (struct cp_lexer): Add in_pragma.
2160 (cp_lexer_consume_token): Don't consume a PRAGMA_EOL
2162 (cp_parser_skip_to_closing_parenthesis): Stop at PRAGMA_EOL.
2163 (cp_parser_skip_to_end_of_statement): Likewise.
2164 (cp_parser_skip_to_end_of_block_or_statement): Likewise.
2165 (cp_parser_skip_to_closing_brace): Likewise.
2166 (cp_parser_skip_to_pragma_eol): Reset in_pragma.
2167 (cp_parser_require_pragma_eol): New.
2168 (cp_parser_statement): Add in_compound argument;
2170 Restart if a non-statement pragma seen outside a
2172 (cp_parser_statement_seq_opt): Stop at PRAGMA_EOL.
2173 (cp_parser_declaration_seq_opt): Likewise.
2174 (cp_parser_member_specification_opt): Likewise.
2175 (cp_parser_function_definition_after_decl): Likewise.
2176 (cp_parser_skip_until_found): Likewise.
2177 (cp_parser_cache_group): Likewise.
2178 (enum pragma_omp_clause, cp_parser_omp_clause_name,
2179 check_no_duplicate_clause,
2180 cp_parser_omp_var_list_no_open,
2181 cp_parser_omp_var_list, cp_parser_omp_clause_copyin,
2182 cp_parser_omp_clause_default, cp_parser_omp_clause_if,
2183 cp_parser_omp_clause_nowait,
2184 cp_parser_omp_clause_num_threads,
2185 cp_parser_omp_clause_ordered,
2186 cp_parser_omp_clause_reduction,
2187 cp_parser_omp_clause_schedule,
2188 cp_parser_omp_all_clauses,
2189 cp_parser_omp_structured_block, cp_parser_omp_atomic,
2190 cp_parser_omp_barrier, cp_parser_omp_critical,
2191 cp_parser_omp_flush, cp_parser_omp_for_loop,
2192 cp_parser_omp_for, cp_parser_omp_master,
2193 cp_parser_omp_ordered, cp_parser_omp_sections_scope,
2194 cp_parser_omp_sections, cp_parser_omp_parallel,
2195 cp_parser_omp_single, cp_parser_omp_threadprivate,
2196 cp_parser_omp_construct): New.
2197 (cp_parser_pragma): Handle OpenMP pragmas.
2198 * semantics.c (finish_omp_threadprivate): New.
2199 (begin_omp_parallel, finish_omp_parallel): New.
2201 2005-10-11 Richard Henderson <rth@redhat.com>
2203 * parser.c (struct cp_token): Add pragma_kind.
2204 (eof_token): Initialize it.
2205 (cp_lexer_handle_pragma): Remove.
2206 (cp_parser_initial_pragma): New.
2207 (cp_lexer_new_main): Use it.
2208 (cp_lexer_get_preprocessor_token): Initialize pragma_kind.
2209 (cp_lexer_print_token): Don't handle CPP_PRAGMA.
2210 (cp_parser_skip_to_pragma_eol): New.
2211 (cp_parser_error): Use it.
2214 2005-10-09 Richard Henderson <rth@redhat.com>
2216 * lex.c (parse_strconst_pragma): Update for c_lex name change.
2217 (handle_pragma_java_exceptions): Likewise.
2218 * parser.c (cp_lexer_new_main): Likewise.
2220 2005-10-06 Richard Henderson <rth@redhat.com>
2222 * parser.c (cp_lexer_new_main): Comment out defer_pragmas.
2223 (cp_lexer_handle_pragma): Comment out
2224 cpp_handle_deferred_pragma.
2226 2005-10-01 Richard Henderson <rth@redhat.com>
2228 * name-lookup.c (lookup_name): Remove prefer_type argument.
2229 (lookup_name_prefer_type): New function.
2230 * name-lookup.h (lookup_name_prefer_type): Declare it.
2231 * decl.c (lookup_and_check_tag): Use it.
2232 * pt.c (tsubst_friend_class): Likewise. Update for
2234 (lookup_template_class, tsubst_copy_and_build): Likewise.
2236 2006-03-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2239 * tree.c (bot_manip): Don't call mark_used.
2241 2006-03-02 Mike Stump <mrs@apple.com>
2243 * decl2.c (import_export_decl): Remove redundant call to
2244 targetm.cxx.key_method_may_be_inline ().
2246 2006-03-02 Richard Sandiford <richard@codesourcery.com>
2248 * decl.c (start_decl): Use have_global_bss_p when deciding
2249 whether to make the decl common.
2251 2006-03-01 Mike Stump <mrs@apple.com>
2254 * decl2.c (import_export_decl): Fix ABI breakage on darwin.
2256 2006-02-24 Geoffrey Keating <geoffk@apple.com>
2258 * except.c (expand_start_catch_block): Handle
2259 flag_use_cxa_get_exception_ptr.
2261 2006-02-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2264 * decl.c (grok_op_properties): Check for ellipsis in arguments of
2267 2006-02-20 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2269 * Make-lang.in (C++): Remove.
2270 (.PHONY): Remove C++.
2272 2006-02-18 Mark Mitchell <mark@codesourcery.com>
2275 * cp-tree.h (cp_finish_decl): Adjust declaration.
2276 (grokbitfield): Likewise.
2277 (finish_static_data_member_decl): Likewise.
2278 * init.c (constant_value_1): Ensure processing_template_decl when
2279 folding non-dependent initializers for static data members of
2280 dependent types. Return error_mark_node for erroneous
2282 * class.c (get_vtable_decl): Use finish_decl, not cp_finish_decl.
2283 * decl.c (cp_make_fname_decl): Adjust call to cp_finish_decl.
2284 (cp_finish_decl): Add init_const_expr_p parameter. Set
2285 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here.
2286 (finish_decl): Adjust call to cp_finish_decl.
2287 (compute_array_index_type): Robustify.
2288 (start_method): Use finish_decl, not cp_finish_decl.
2289 * rtti.c (emit_tinfo_decl): Likewise.
2290 * except.c (initialize_handler_parm): Adjust call to
2292 (expand_start_catch_block): Likewise.
2293 * cvt.c (build_up_reference): Adjust call to cp_finish_decl.
2294 * pt.c (instantiate_class_template): Adjust call to
2295 finish_static_data_member_decl.
2296 (tsubst_expr): Use finish_decl, not cp_finish_decl.
2297 (instantiate_decl): Adjust call to cp_finish_decl.
2298 * name-lookup.c (pushdecl_top_level_1): Use finish_decl, not
2300 * decl2.c (finish_static_data_member_decl): Add init_const_expr_p
2302 (grokfield): Likewise.
2303 * parser.c (cp_parser_condition): Check for constant initializers.
2304 (cp_parser_init_declarator): Adjust calls to grokfield and
2305 cp_finish_decl. Don't set
2306 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here.
2307 (cp_parser_member_declaration): Likewise.
2308 (cp_parser_objc_class_ivars): Likewise.
2310 2006-02-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2312 * call.c (standard_conversion): Return NULL instead of 0.
2313 (build_user_type_conversion_1): Likewise.
2314 (tourney): Likewise.
2315 * decl.c (redeclaration_error_message): Likewise.
2316 * error.c (language_to_string): Likewise.
2318 2006-02-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2320 * cp-tree.h (warn_hidden): Remove prototype.
2321 * class.c (warn_hidden): Make static.
2323 * cp-tree.h (build_type_conversion): Remove prototype.
2324 * cvt.c (build_type_conversion): Add prototype, make static.
2326 * cp-tree.h (push_tinst_level): Remove prototype.
2327 (pop_tinst_level): Likewise.
2328 * pt.c (push_tinst_level): Add prototype, make static.
2329 (pop_tinst_level): Likewise.
2331 2006-02-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2333 * decl.c (grokdeclarator): Return NULL_TREE instead of 0.
2334 * typeck.c (unary_complex_lvalue): Likewise.
2336 2006-02-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2338 * lex.c (parse_strconst_pragma): Return error_mark_node instead of
2339 "(tree)-1" to indicate failure. Simplify.
2340 (handle_pragma_interface): Test for error_mark_node instead of
2342 (handle_pragma_implementation): Likewise.
2344 2006-02-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2347 * parser.c (cp_parser_decl_specifier_seq): Check for duplicate
2348 decl-specifiers. Remove extra check for duplicate 'friend'.
2349 * decl.c (grokdeclarator): Remove check for duplicate
2350 decl-specifiers. Set longlong together with long_p.
2352 2006-02-12 Jason Merrill <jason@redhat.com>
2355 * except.c (build_throw): Add a CLEANUP_POINT_EXPR inside the
2356 TRY_CATCH_EXPR or MUST_NOT_THROW_EXPR.
2358 2006-02-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2360 * class.c (debug_class): Remove extern.
2361 (debug_thunks): Likewise.
2363 2006-02-09 Gabriel Dos Reis <gdr@integrable-solutions.net>
2365 * typeck.c (string_conv_p): Don't test for flag_const_strings.
2367 2006-02-08 Jason Merrill <jason@redhat.com>
2370 * cp-gimplify.c (cp_gimplify_expr): Don't call
2371 cp_gimplify_init_expr for MODIFY_EXPRs.
2372 * typeck2.c (split_nonconstant_init_1): Use INIT_EXPR.
2374 2006-02-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2377 * decl.c (grokdeclarator): Set dname also for destructor.
2380 * decl.c (grokdeclarator): Clear storage_class together with staticp.
2382 2006-02-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
2384 * cp-tree.h (tf_warning_or_error): Renamed from tf_warn_or_error.
2385 (cp_build_qualified_type): Propogate renaming.
2386 * call.c (convert_like_real): Likewise.
2387 * cvt.c (cp_convert_to_pointer, convert_to_reference): Likewise.
2388 * decl.c (make_typename_type, grokdeclarator): Likewise.
2389 * pt.c (tsubst_friend_function, instantiate_class_template,
2390 tsubst_default_argument, instantiate_decl,
2391 tsubst_initializer_list, tsubst_enum): Likewise.
2392 * semantics.c (finish_template_type): Likewise.
2393 * typeck.c (build_ptrmemfunc, convert_for_assignment): Likewise.
2395 2006-02-07 Dirk Mueller <dmueller@suse.com>
2397 * typeck.c (build_binary_op): Annotate div-by-zero
2398 warnings to make -Wno-div-by-zero have an effect.
2400 2006-02-07 Mark Mitchell <mark@codesourcery.com>
2403 * pt.c (coerce_template_template_parms): Do not templates with
2404 excess default arguments to match template template parameters
2405 with fewer parameters.
2406 (coerce_template_parms): Add use_default_args parameter; use
2407 default arguments only when true.
2408 (lookup_template_class): Adjust call to coerce_template_parms.
2409 (fn_type_unification): Likewise.
2411 (get_bindings): Likewise.
2412 (dependent_type_p): Add assertions.
2414 2006-02-06 Roger Sayle <roger@eyesopen.com>
2416 * decl.c (grokdeclarator): Don't bother checking for CHAR_TYPE.
2417 * rtti.c (typeinfo_in_lib_p): Likewise.
2418 * cp-tree.h (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P): Likewise.
2419 * name-lookup.c (arg_assoc_type): Likewise.
2421 2006-02-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2423 * cp-tree.h (tf_warn_or_error): New substituion flag.
2424 (cp_build_qualified_type): Use it.
2425 * call.c (convert_like_real): Likewise.
2426 * cvt.c (cp_convert_to_pointer): Likewise.
2427 (convert_to_reference): Likewise.
2428 * decl.c (make_typename_type): Likewise.
2429 (grokdeclarator): Likewise.
2430 * pt.c (tsubst_friend_function): Likewise.
2431 (tsubst_friend_class): Likewise.
2432 (instantiate_class_template): Likewise.
2433 (tsubst_default_argument): Likewise.
2434 (instantiate_decl): Likewise.
2435 (tsubst_initializer_list): Likewise.
2436 (tsubst_enum): Likewise.
2437 * semantics.c (finish_template_type): Likewise.
2438 * typeck.c (build_ptrmemfunc): Likewise.
2439 (convert_for_assignment): Likewise.
2441 2006-02-03 Lee Millward <lee.millward@gmail.com>
2443 * typeck.c (string_conv_p): Pass appropiate
2444 OPT_Wxxxx values when calling warning().
2445 (build_array_ref, cxx_mark_addressable): Likewise.
2446 (check_return_expr): Likewise.
2448 * init.c (perform_member_init): Likewise.
2449 (sort_mem_initializers, emit_mem_initializers): Likewise.
2451 * class.c (check_field_decls): Likewise.
2452 (warn_about_ambiguous_bases): Likewise.
2454 * decl.c (pop_label, poplevel): Likewise.
2455 (duplicate_decls, grok_op_properties): Likewise.
2456 (start_preparsed_function, finish_function): Likewise.
2458 * name-lookup.c (pushdecl_maybe_friend): Likewise.
2459 (pushdecl_maybe_friend): Likewise.
2461 * parser.c (cp_parser_warn_min_max): Likewise.
2462 (cp_parser_cast_expression): Likewise.
2464 * method.c (lazily_declare_fn): Likewise.
2465 * cvt.c (convert_to_void): Likewise.
2466 * mangle.c (finish_mangling): Likewise.
2467 * cp-gimplify.c (gimplify_expr_stmt): Likewise.
2469 2006-02-03 Mark Mitchell <mark@codesourcery.com>
2471 * name-lookup.c (do_class_using_decl): Use IDENTIFIER_TYPENAME_P,
2472 not IDENTIFIER_OPNAME_P.
2474 2006-01-31 Mark Mitchell <mark@codesourcery.com>
2477 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Revise
2479 * pt.c (determine_specialization): Use INNERMOST_TEMPLATE_PARMS,
2481 (instantiate_class_template): Simplify.
2482 (verify_class_unification): Remove.
2483 (unify): Document parameters. Use INNERMOST_TEMPLATE_ARGS to
2484 permit multiple levels of template arguments.
2485 (more_specialized_class): Simplify.
2486 (get_class_bindings): Pass full arguments to unify. Fold
2487 verify_class_unification into this function. Return full
2489 (most_specialized_class): Adjust for changes to
2490 get_class_bindings. Issue errors here for ambiguity. Return the
2491 fully deduced arguments for the most specialized class, in
2492 addition to the partial specialization.
2494 2006-01-31 Ben Elliston <bje@au.ibm.com>
2496 * mangle.c: Comment fix.
2498 2006-01-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
2500 * Make-lang.in (cp-warn): Include CXX_COMPAT_WARN.
2501 * repo.c (extract_string, afgets): Use cast when converting from
2504 2006-01-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
2506 * call.c (alloc_conversion): Use cast when converting from void *.
2507 (alloc_conversions): Likewise.
2508 (add_candidate): Likewise.
2509 (print_z_candidates): Likewise.
2510 (add_warning): Likewise.
2511 * pt.c (retrieve_local_specialization): Likewise.
2512 (process_partial_specialization): Likewise.
2513 (mangle_class_name_for_template): Likewise.
2514 (tsubst_template_args): Likewise.
2515 * typeck2.c (pat_calc_hash): Likewise.
2516 (pat_compare): Likewise.
2517 (abstract_virtuals_error): Likewise.
2518 * class.c (method_name_cmp): Likewise.
2519 (resort_method_name_cmp): Likewise.
2520 (get_vfield_name): Likewise.
2521 * decl2.c (generate_ctor_and_dtor_functions_for_priority): Likewise.
2522 * lex.c (init_reswords): Likewise.
2523 * rtti.c (create_pseudo_type_info): Likewise.
2524 * search.c (dfs_lookup_base): Likewise.
2525 (dfs_dcast_hint_pre): Likewise.
2526 (dfs_dcast_hint_post): Likewise.
2527 * tree.c (hash_tree_cons): Likewise.
2528 * repo.c (extract_string): Likewise.
2530 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Likewise.
2531 * g++spec.c (lang_specific_driver): Likewise.
2533 2006-01-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
2535 * call.c (joust): Pass option code to warning. Use inform for
2537 * class.c (check_bases): Likewise.
2538 (maybe_warn_about_overly_private_class): Likewise.
2539 (check_field_decls): Likewise.
2540 (layout_empty_base): Likewise.
2541 (layout_virtual_bases): Likewise.
2542 (layout_class_type): Likewise.
2544 2006-01-28 Mark Mitchell <mark@codesourcery.com>
2547 * decl.c (start_preparsed_function): Call maybe_apply_pragma_weak
2549 (start_function): ... here.
2551 2006-01-28 Mark Mitchell <mark@codesourcery.com>
2554 * class.c (resolve_address_of_overloaded_function): Adjust use of
2555 return value from most_specialized_instantiation.
2556 * pt.c (determine_specialization): Avoid multiple calls to
2558 (most_specialized_instantiation): When a tie occurs, set the
2559 current presumed champion to the next template. Return the
2560 TREE_LIST node containing the template, rather than the template
2562 (most_specialized): Remove.
2563 * name-lookup.c (push_overloaded_decl): When duplicate_decls
2564 indicates a failed redeclaration, report that to callers.
2566 2006-01-26 Jason Merrill <jason@redhat.com>
2569 * name-lookup.c (parse_using_directive): Require strong using to
2570 name a nested namespace.
2572 2006-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2575 * cp-tree.h (do_poplevel): Remove prototype.
2576 * semantics.c (do_poplevel): Add prototype. Make static.
2579 * cp-tree.h (default_conversion): Remove prototype.
2580 * typeck.c (default_conversion): Make static.
2582 2006-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2584 * cp-tree.h (get_primary_binfo): Remove prototype.
2585 (push_using_decl): Likewise.
2586 (current_template_args): Likewise.
2587 (more_specialized_class): Likewise.
2588 (mark_class_instantiated): Likewise.
2589 (default_conversion): Likewise.
2590 (pfn_from_ptrmemfunc): Likewise.
2591 * class.c (get_primary_binfo): Add prototype, make static, simplify.
2592 * name-lookup.c (push_using_decl): Make static.
2593 * pt.c (current_template_args): Likewise.
2594 (more_specialized_class): Likewise.
2595 (mark_class_instantiated): Likewise.
2596 * typeck.c (default_conversion): Make static.
2597 (pfn_from_ptrmemfunc): Add prototype, make static.
2599 2006-01-24 Dirk Mueller <dmueller@suse.de>
2601 * typeck.c (build_binary_op): Use OPT_Wfloat_equal in warning().
2603 2006-01-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2606 * parser.c (cp_parser_unqualified_id): Check that destructor name
2608 * call.c (check_dtor_name): Do not expect a BIT_NOT_EXPR.
2609 Adjust comment. Return early if possible.
2610 Use same_type_p to compare types.
2611 * typeck.c (lookup_destructor): Adjust call to check_dtor_name.
2613 2006-01-24 Mark Mitchell <mark@codesourcery.com>
2615 * semantics.c: Remove outdated comment.
2617 2006-01-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2619 * cp-tree.h (do_poplevel): Remove prototype.
2620 * semantics.c (do_poplevel): Add prototype. Make static.
2622 * cp-tree.h (original_type): Remove prototype.
2623 * typeck.c (original_type): Make static.
2625 * cp-tree.h (declare_global_var): Remove prototype.
2626 * decl.c (declare_global_var): Make static.
2628 * cp-tree.h (implicitly_declare_fn): Remove prototype.
2629 * method.c (implicitly_declare_fn): Make static.
2631 * cp-tree.h (fold_decl_constant_value): Remove prototype.
2632 * pt.c (fold_decl_constant_value): Make static.
2634 * cp-tree.h (build_x_delete): Remove prototype.
2635 * init.c (build_vec_delete_1): Call build_op_delete_call directly
2636 and not via build_x_delete.
2637 (build_x_delete): Remove.
2639 * cp-tree.h (get_vtt_name): Remove prototype.
2640 * class.c (get_vtt_name): Remove.
2641 (build_vtt): Call mangle_vtt_for_type instead of get_vtt_name.
2643 2006-01-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2645 * rtti.c (build_dynamic_cast): Fix comment.
2647 2006-01-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2650 * rtti.c (build_dynamic_cast): Reject dynamic_cast use if
2653 2006-01-21 Mark Mitchell <mark@codesourcery.com>
2656 * class.c (build_base_path): Generate a NOP_EXPR instead of a
2657 COMPONENT_REF if the base and derived classes are at the same
2661 * decl.c (begin_destructor_body): Robustify.
2664 * parser.c (cp_parser_direct_declarator): Robustify.
2666 2006-01-20 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2668 * parser.c (cp_lexer_next_token_is_keyword): Simplify.
2670 * parser.c (clear_decl_specs): Remove prototype.
2672 * parser.c (cp_parser_expression_fn): Remove.
2674 * call.c (add_builtin_candidates): Remove superfluous return.
2675 * name-lookup.c (do_toplevel_using_decl): Likewise.
2676 * parser.c (cp_parser_type_specifier_seq): Likewise.
2677 (cp_parser_save_default_args): Likewise.
2679 2006-01-20 Dirk Mueller <dmueller@suse.com>
2682 * semantics.c (finish_if_stmt): Call empty_body_warning.
2683 * parser.c (cp_parser_implicitly_scoped_statement):
2684 Mark empty statement with an empty stmt.
2686 2006-01-19 Mark Mitchell <mark@codesourcery.com>
2689 * name-lookup.c (do_class_using_decl): Don't try to look up base
2690 classes in templates with dependent base types.
2692 2006-01-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2695 * pt.c (maybe_process_partial_specialization): Return early on
2698 2006-01-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2701 * decl.c (start_preparsed_function): Check default arguments
2703 * name-lookup.c (pushdecl_maybe_friend): Check default arguments
2704 of all functions and function templates.
2705 * parser.c (cp_parser_late_parsing_default_args): Check default
2707 * decl2.c (check_default_args): Set missing default arguments to
2710 2006-01-18 Mark Mitchell <mark@codesourcery.com>
2713 * cp-tree.h (push_class_stack): New function.
2714 (pop_class_stack): Likewise.
2715 * class.c (class_stack_node): Add hidden field.
2716 (pushclass): Clear it.
2717 (push_class_stack): New function.
2718 (pop_class_stack): Likewise.
2719 (currently_open_class): Ignore hidden classes.
2720 (currently_open_derived_class): Likewise.
2721 * name-lookup.c (push_to_top_level): Call push_class_stack.
2722 (pop_from_top_level): Call pop_class_stack.
2724 2006-01-18 Kazu Hirata <kazu@codesourcery.com>
2726 * tree.c (find_tree_t, find_tree): Remove.
2727 * cp-tree.h: Remove the prototype for find_tree.
2729 2006-01-18 Jakub Jelinek <jakub@redhat.com>
2731 * search.c (lookup_conversions_r): Fix a pasto.
2733 2006-01-17 Eric Christopher <echristo@apple.com>
2735 * call.c (convert_like_real): When issuing conversion
2736 warnings, depend on OPT_Wconversion.
2737 * cvt.c (build_expr_type_conversion): Ditto.
2739 2006-01-17 Kazu Hirata <kazu@codesourcery.com>
2741 * name-lookup.c (lookup_namespace_name): Remove.
2742 * name-lookup.h: Remove the prototype for
2743 lookup_namespace_name.
2745 2006-01-17 Jakub Jelinek <jakub@redhat.com>
2748 * decl.c (compute_array_index_type): After issuing not an integral
2749 constant-expression error, set size to 1 to avoid ICEs later on.
2751 2006-01-16 Ian Lance Taylor <ian@airs.com>
2753 * parser.c: Include "cgraph.h".
2754 (cp_parser_asm_definition): Call cgraph_add_asm_node rather than
2757 2006-01-16 Rafael �ila de Esp�dola <rafael.espindola@gmail.com>
2759 * g++spec.c (lang_specific_spec_functions): Remove.
2761 2006-01-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
2763 * decl.c (check_initializer): Fix thinko.
2765 2006-01-14 Mark Mitchell <mark@codesourcery.com>
2768 * parser.c (cp_parser_direct_declarator): Use cp_parser_error
2771 2006-01-13 Jason Merrill <jason@redhat.com>
2773 * pt.c (check_explicit_specialization): Use CP_DECL_CONTEXT even more.
2775 * name-lookup.c (set_decl_namespace): Use CP_DECL_CONTEXT.
2776 * pt.c (check_explicit_specialization): Likewise.
2778 2006-01-12 Jason Merrill <jason@redhat.com>
2781 * pt.c (check_explicit_specialization): Handle namespace
2783 * name-lookup.c (set_decl_namespace): Likewise.
2785 2006-01-12 Nathan Sidwell <nathan@codesourcery.com>
2788 * class.c (handle_using_decl): Pass correct scope to
2789 cp_emit_debug_info_for_using.
2791 2006-01-11 Nathan Sidwell <nathan@codesourcery.com>
2794 * tree.c (lvalue_p_1): Any part of a COMPONENT_REF affects
2797 2006-01-06 Gabriel Dos Reis <gdr@integrablesolutions.net>
2799 * parser.c (cp_parser_primary_expression): Document the grammar
2800 for the built-in offsetof, a GNU extension.
2802 2006-01-04 Zdenek Dvorak <dvorakz@suse.cz>
2805 * init.c (constant_value_1): Unshare use of DECL_INITIAL. Fix a typo
2808 2006-01-04 Chris Lattner <sabre@gnu.org>
2810 * typeck2.c: update copyright to 2006
2811 (split_nonconstant_init_1): Set TREE_CONSTANT to true.
2813 2006-01-04 Mark Mitchell <mark@codesourcery.com>
2816 * parser.c (cp_parser_nested_name_specifier_opt): Preserve access
2817 checks, even when parsing tentatively.
2819 2006-01-04 Richard Henderson <rth@redhat.com>
2821 Merge from gomp branch.
2822 * lex.c (handle_pragma_java_exceptions): Fix whitespace.
2823 * parser.c (struct cp_token): Add pragma_kind.
2824 (eof_token): Update to match.
2825 (struct cp_lexer): Add in_pragma; rearrange next for better packing.
2826 (cp_parser_initial_pragma): New.
2827 (cp_lexer_new_main): Use it. Don't bother clearing
2828 c_lex_return_raw_strings.
2829 (cp_lexer_get_preprocessor_token): Always initialize keyword
2830 and pragma_kind fields. Handle CPP_PRAGMA.
2831 (cp_lexer_consume_token): Don't allow CPP_PRAGMA_EOL when
2833 (cp_lexer_handle_pragma): Remove. Update callers to cp_parser_pragma.
2834 (cp_lexer_print_token) <CPP_PRAGMA>: Don't print as a string.
2835 (cp_parser_skip_to_pragma_eol): New.
2836 (cp_parser_error): Use it.
2837 (cp_parser_skip_to_closing_parenthesis): Stop at CPP_PRAGMA_EOL;
2838 rearrange with switch statement.
2839 (cp_parser_skip_to_end_of_statement): Likewise.
2840 (cp_parser_skip_to_end_of_block_or_statement): Likewise.
2841 (cp_parser_skip_to_closing_brace): Likewise.
2842 (cp_parser_skip_until_found): Likewise.
2843 (cp_parser_statement): Add in_compound argument; update callers.
2844 Use it to decide how to handle pragma parsing.
2845 (cp_parser_labeled_statement): Add in_compound argument; pass
2846 it on to cp_parser_statement.
2847 (cp_parser_statement_seq_opt): Stop at CPP_PRAGMA_EOL.
2848 (cp_parser_declaration_seq_opt): Likewise.
2849 (cp_parser_parameter_declaration): Likewise.
2850 (cp_parser_member_specification_opt): Likewise.
2851 (cp_parser_function_definition_after_decl): Likewise.
2852 (cp_parser_cache_group): Handle CPP_PRAGMA/CPP_PRAGMA_EOL pairs.
2853 (cp_parser_pragma): New.
2856 2006-01-04 Dirk Mueller <dmueller@suse.com>
2858 * decl.c (finish_constructor_body): create simple
2859 compound stmt instead of a if(1) { } construct.
2861 2006-01-03 Mark Mitchell <mark@codesourcery.com>
2864 * name-lookup.c (push_class_level_binding): When a derived class
2865 provides a type binding, eliminate any type binding from a base
2869 * repo.c (repo_emit_p): Always instantiate static data members
2870 initialized by constant expressions, so that there values are
2873 2006-01-02 Mark Mitchell <mark@codesourcery.com>
2876 * class.c (add_method): Set TYPE_HAS_CONVERSION for classes with a
2877 conversion operator.
2878 * decl.c (grokdeclarator): Do not set TYPE_HAS_CONVERSION here.
2881 * class.c (add_method): Never associate more than one destructor
2882 with a single class.
2885 * cp-tree.h (do_friend): Adjust prototype.
2886 * decl.c (grokfndecl): Make funcdef_flag a bool, not an int.
2887 (grokdeclarator): Likewise. Refine check for invalid
2888 declarations/definitions of member functions outside of their own
2890 * friend.c (do_friend): Make funcdef_flag a bool, not an int.
2893 * parser.c (cp_parser_mem_initializer_list): Check result of
2894 cp_parser_mem_initializer against error_mark_node, not NULL_TREE.
2895 (cp_parser_mem_initializer): Return error_mark_node for failure.
2898 * parser.c (cp_parser_template_parameter_list): Call
2899 begin_template_parm_list and end_template_parm_list here.
2900 (cp_parser_type_parameter): Not here.
2901 (cp_parser_template_declaration_after_export): Or here.
2902 (cp_parser_elaborated_type_specifier): Call
2903 cp_parser_check_template_parameters.
2905 * tree.c (build_target_expr_with_type): Use force_target_expr.
2907 * decl2.c (mark_used): Fix typo in comment.
2909 2006-01-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2911 * parser.c (cp_parser_using_declaration): Skip name-lookup on
2914 2005-12-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
2916 * cxx-pretty-print.c (pp_cxx_constant): New. Print
2917 string-literal in parens if input program says so.
2918 (pp_cxx_primary_expression): Hand off constant printing to
2920 (pp_cxx_pretty_printer_init): Set pp->c_base.constant.
2921 (pp_cxx_expression): Use pp_cxx_constant for literals.
2922 * error.c (dump_expr): Use pp_constant for literals.
2924 2005-12-29 Nathan Sidwell <nathan@codesourcery.com>
2926 * method.c (make_thunk): Don't set comdat_linkage here.
2927 (use_thunk): Make thunk one only here, if thunk target is
2930 2005-12-26 Mark Mitchell <mark@codesourcery.com>
2933 * decl.c (grokdeclarator): Remove dead code.
2934 * ptree.c (cxx_print_xnode): Handle BASELINK.
2935 * parser.c (make_id_declarator): Add sfk parameter.
2936 (cp_parser_direct_declarator): Do not pass TYPE_DECLs to
2938 (cp_parser_declarator_id): Simplify BASELINKs here.
2939 (cp_parser_member_declaration): Adjust calls to
2942 2005-12-26 Mark Mitchell <mark@codesourcery.com>
2944 PR c++/23171, c++/23172, c++/25417.
2945 * typeck.c (build_unary_op): Create temporary variables for
2946 compound literals whose addresses are taken.
2947 * init.c (expand_aggr_init_1): Use COMPOUND_LITERAL_P.
2948 * decl.c (reshape_init_vector): Likewise.
2949 (reshape_init): Give it external linkage.
2950 (check_initializer): Use COMPOUND_LITERAL_P.
2951 (initialize_artificial_var): Allow the initializer to be a
2953 * call.c (make_temporary_var_for_ref_to_temp): Use
2954 create_temporary_var.
2955 * cp-tree.h (COMPOUND_LITERAL_P): New macro.
2956 (rehape_init): Declare.
2957 * typeck2.c (digest_init): Use COMPOUND_LITERAL_P.
2958 * semantics.c (finish_compound_literal): Use reshape_init.
2960 2005-12-23 Mark Mitchell <mark@codesourcery.com>
2963 * pt.c (instantiate_template): Handle SFINAE.
2965 2005-12-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2967 * decl.c (grokdeclarator): Improve diagnostic for friend
2968 declarations of class members.
2970 2005-12-22 Mark Mitchell <mark@codesourcery.com>
2973 * tree.c (really_overloaded_fn): Tweak comment.
2974 * pt.c (tsubst_call_declarator_parms): Remove.
2975 (tsubst_copy): Call mark_used on the member referenced by an
2977 * semantics.c (finish_qualified_id_expr): Simplify.
2978 * decl2.c (mark_used): Accept BASELINKs.
2981 * typeck.c (build_unary_op): Pass DECLs not names to
2983 * init.c (build_offset_ref): Do not do name lookup. Do not call
2985 * call.c (build_call): Simplify and tidy.
2986 * semantics.c (finish_qualified_id_expr): Call mark_used.
2988 2005-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2991 * parser.c (cp_parser_pure_specifier): Check for PURE_ZERO to
2992 identify a single '0'.
2994 2005-12-20 Mark Mitchell <mark@codesourcery.com>
2997 * decl.c (use_eh_spec_block): New function.
2998 (store_parm_decls): Use it.
2999 (finish_function): Likewise.
3001 2005-12-19 Mark Mitchell <mark@codesourcery.com>
3004 * init.c (expand_member_init): Print messages about baseclasses
3005 using %T rather than %D.
3008 * class.c (add_method): Do not treat templates as identical unless
3009 their return types are the same.
3011 2005-12-12 Mark Mitchell <mark@codesourcery.com>
3014 * tree.c (build_qualified_name): Return error_mark_node for
3017 2005-12-10 Mark Mitchell <mark@codesourcery.com>
3020 * pt.c (tsubst_copy_and_build): Permit dependent types for the
3021 object in a class member access expression.
3023 2005-12-10 Terry Laurenzo <tlaurenzo@gmail.com>
3026 * mangle.c (write_bare_function_type): Mangle return type for
3027 methods of Java classes
3029 2005-12-08 Th�dore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
3031 * call.c (build_conditional_expr): Print types in error messages.
3033 2005-12-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3035 * expr.c (cxx_expand_expr): Call gcc_unreachable instead of abort.
3037 2005-12-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3039 * cp-gimplify.c (gimplify_cp_loop): Use fold_build3.
3041 2005-12-07 Rafael �ila de Esp�dola <rafael.espindola@gmail.com>
3043 * Make-lang.in (c++.all.build, c++.install-normal): Remove.
3045 2005-12-07 Rafael �ila de Esp�dola <rafael.espindola@gmail.com>
3047 * Make-lang.in: Remove all dependencies on s-gtype.
3049 2005-12-06 Aldy Hernandez <aldyh@redhat.com>
3052 * decl.c (reshape_init_array_1): Handle max_index of -1.
3054 2005-12-06 Roger Sayle <roger@eyesopen.com>
3056 * typeck.c (build_binary_op): Issue warning if either operand of a
3057 comparison operator is a string literal, except for testing equality
3058 or inequality against NULL.
3060 2005-12-06 Roger Sayle <roger@eyesopen.com>
3063 * decl.c (compute_array_index_type): Check that itype is an
3064 INTEGER_CST node before testing/clearing TREE_OVERFLOW.
3066 2005-12-05 Daniel Berlin <dberlin@dberlin.org>
3068 * ptree.c (cxx_print_decl): Update to check for decl_common
3071 2005-12-02 Mark Mitchell <mark@codesourcery.com>
3074 * decl.c (duplicate_decls): Don't rely on DECL_TEMPLATE_INFO after
3077 2005-12-02 Richard Guenther <rguenther@suse.de>
3079 * semantics.c (simplify_aggr_init_expr): Use buildN instead
3082 2005-12-02 Gabriel Dos Reis <gdr@integrable-solutions.net>
3084 * parser.c (cp_lexer_new_main): Usr GGC_RESIZEVEC instead of
3086 (cp_parser_template_argument_list): Use XRESIZEVEC instead of
3088 * class.c (pushclass): Likewise.
3090 2005-12-02 Gabriel Dos Reis <gdr@integrable-solutions.net>
3092 * decl2.c (get_priority_info): Use XNEW, not xmalloc.
3093 * decl.c (push_switch): Likewise.
3094 * lex.c (handle_pragma_implementation): Likewise.
3095 * cp-objcp-common.c (decl_shadowed_for_var_insert): Use GGC_NEW,
3097 (cxx_initialize_diagnostics): Use XNEW, not xmalloc.
3098 * class.c (init_class_processing): Use XNEWVEC, not xmalloc.
3099 * g++spec.c (lang_specific_driver): Likewise.
3100 * mangle.c (save_partially_mangled_name): Likewise.
3101 * parser.c (cp_lexer_new_main): Use GGC_NEWVEC, not ggc_alloc.
3102 (cp_parser_template_argument_list): Use XNEWVEC, nto xmalloc.
3103 (cp_parser_sizeof_operand): Likewise.
3104 * repo.c (open_repo_file, open_repo_file): Likewise.
3106 2005-12-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
3108 * parser.c (cp_parser_make_typename_type): Call make_typename_type
3109 with tf_none instead of magic value 0.
3110 (cp_parser_explicit_instantiation): Call do_type_instantiation
3111 with tf_error instead of magic value 1.
3112 (cp_parser_elaborated_type_specifier): Call make_typename_type
3113 with tf_error instead of magic value 1.
3114 (cp_parser_class_name): Likewise.
3115 (cp_parser_lookup_name): Likewise.
3117 2005-12-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
3119 * parser.c (cp_parser_declaration): Set token2.type to CPP_EOF,
3122 2005-11-30 Jason Merrill <jason@redhat.com>
3125 * cp-gimplify.c (cp_genericize_r): Don't dereference invisible reference
3128 2005-11-30 Ben Elliston <bje@au.ibm.com>
3130 * typeck.c (build_x_unary_op): Correct spelling in error message.
3132 2005-11-28 Nathan Sidwell <nathan@codesourcery.com>
3135 * class.c (check_field_decls): Only set DECL_PACKED on a field
3136 when its natural alignment is > BITS_PER_UNIT.
3138 2005-11-27 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3141 * cp-tree.h (DECL_MAIN_P): Remove duplicate definition.
3143 2005-11-26 Richard Henderson <rth@redhat.com>
3145 * lex.c: Update for pragma_lex rename.
3146 * parser.c: Likewise.
3148 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3151 * decl.c (grokparms): Do not allow typedef-names in a '(void)'
3154 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3156 * typeck2.c (process_init_constructor_union): Remove check for
3157 unnamed union members.
3159 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3161 * name-lookup.c (lookup_name_real): Merge two if's.
3163 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3165 * pt.c (instantiate_class_template): Clean-up.
3167 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3169 * pt.c (template_class_depth_real): Remove. Move functionality to ...
3170 (template_class_depth): ... here, replacing count_specializations
3171 with 0. Adjust comment.
3173 2005-11-24 Richard Guenther <rguenther@suse.de>
3174 Dirk Mueller <dmueller@suse.de>
3177 * typeck.c (build_reinterpret_cast_1): Use
3178 strict_aliasing_warning.
3180 2005-11-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3183 * pt.c (check_instantiated_args): Reword diagnostic message about
3184 template argument involving local types.
3186 2005-11-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3189 * typeck.c (build_array_ref): Avoid code duplicate. Use common
3190 C/C++ diagnostic function warn_array_subscript_with_type_char.
3192 2005-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3195 * error.c (resolve_virtual_fun_from_obj_type_ref): New.
3196 (dump_expr): Use it in <case CALL_EXPR>.
3198 2005-11-21 Richard Henderson <rth@redhat.com>
3200 * cp-objcp-common.h, name-lookup.c, name-lookup.h: Revert 11-18 patch.
3202 * name-lookup.c (lookup_name): Remove prefer_type argument.
3203 (lookup_name_prefer_type): New.
3204 * decl.c (lookup_and_check_tag): Use them.
3205 * pt.c (tsubst_friend_class): Likewise.
3206 (lookup_template_class): Likewise.
3207 (tsubst_copy_and_build): Likewise.
3208 * name-lookup.h (lookup_name_prefer_type): New.
3209 (lookup_name): Remove declaration.
3211 2005-11-18 Mark Mitchell <mark@codesourcery.com>
3214 * decl.c (grokfndecl): Set up DECL_TEMPLATE_INFO before calling
3216 * name-lookup.c (set_decl_namespace):
3218 2005-11-18 Mike Stump <mrs@apple.com>
3220 * cp-objcp-common.h (LANG_HOOKS_LOOKUP_NAME): Add.
3221 * name-lookup.c (lookup_name_two): Remove.
3222 (lookup_name_one): Add.
3223 * name-lookup.h (lookup_name_two): Remove.
3224 (lookup_name_one): Add.
3226 2005-11-15 Jason Merrill <jason@redhat.com>
3229 * method.c (locate_copy): Also use skip_artificial_parms here.
3230 (synthesize_exception_spec): Use CLASS_TYPE_P rather than checking
3232 (locate_ctor): Abort if we fail to find a default constructor.
3234 2005-11-15 Mike Stump <mrs@apple.com>
3236 * name-lookup.c (lookup_name_two): Add.
3237 * name-lookup.h: Likewise.
3239 2005-11-15 Mark Mitchell <mark@codesourcery.com>
3242 * typeck.c (check_for_casting_away_constness): Use the diag_fn.
3243 (build_const_cast_1): Call it, for C-style casts.
3245 2005-11-14 Mark Mitchell <mark@codesourcery.com>
3248 * pt.c (check_explicit_specialization): Don't check for C linkage.
3249 (push_template_decl_real): Likewise.
3250 * parser.c (cp_parser_explicit_specialization): Check here.
3251 (cp_parser_template_declaration_after_export): And here.
3253 * parser.c (cp_lexer_get_preprocessor_token): Initialize keyword
3256 2005-11-14 Jason Merrill <jason@redhat.com>
3259 * method.c (locate_ctor): Skip all artificial parms, not just
3262 2005-11-14 Mark Mitchell <mark@codesourcery.com>
3264 * parser.c (eof_token): Add initializer for ambiguous_p.
3266 2005-11-13 Mark Mitchell <mark@codesourcery.com>
3269 * decl.c (check_redeclaration_exception_specification): New
3271 (duplicate_decls): Use it.
3272 * error.c (fndecl_to_string): Print the template parameter list.
3275 * cxx-pretty-print.c (pp_cxx_statement): Print qualifying scopes
3277 (pp_cxx_original_namespace_definition): Likewise.
3278 * name-lookup.c (ambiguous_decl): Don't issue error messages;
3279 instead return lists of ambiguous candidates.
3280 (select_decl): Handle ambiguous namespace lookups.
3281 * parser.c (cp_token): Add ambiguous_p.
3282 (cp_lexer_get_preprocessor_token): Set it.
3283 (cp_parser_diagnose_invalid_type_name): Avoid duplicate messages
3284 when a qualified name uses an invalid scope.
3285 (cp_parser_primary_expression): Print ambiguous candidates.
3286 (cp_parser_type_parameter): Adjust comment to reflect new
3287 parameter name for cp_parser_lookup_name.
3288 (cp_parser_template_argument): Likewise.
3289 (cp_parser_elaborated_type_specifier): Likewise.
3290 (cp_parser_namespace_name): Likewise.
3291 (cp_parser_class_name): Print ambiguous candidates.
3292 (cp_parser_lookup_name): Rename ambiguous_p parameter to
3293 ambiguous_decls. Use it to return a list of ambiguous candiates
3294 when a lookup is ambiguous.
3295 (cp_parser_lookup_name_simple): Adjust comment to reflect new
3296 parameter name for cp_parser_lookup_name.
3298 2005-11-12 Jakub Jelinek <jakub@redhat.com>
3301 * typeck.c (complete_type): Set TYPE_NEEDS_CONSTRUCTING
3302 and TYPE_HAS_NONTRIVIAL_DESTRUCTOR flags for all variants
3306 * pt.c (tsubst_copy_asm_operands): New function.
3307 (tsubst_expr) <case ASM_EXPR>: Use it.
3309 2005-11-08 Jakub Jelinek <jakub@redhat.com>
3312 * decl.c (redeclaration_error_message): Issue diagnostics about
3313 olddecl and newdecl disagreement on __thread property.
3314 (grokdeclarator): Set DECL_TLS_MODEL on class static variables.
3316 2005-11-08 Jason Merrill <jason@redhat.com>
3319 * method.c (use_thunk): Use build_cplus_new instead of
3322 2005-11-06 Jason Merrill <jason@redhat.com>
3323 James A. Morrison <phython@gcc.gnu.org>
3326 * decl2.c (cp_finish_file): Fix conditions for undefined warning.
3327 Set TREE_NO_WARNING instead of TREE_PUBLIC.
3328 * pt.c (instantiate_pending_templates): Set DECL_INITIAL to avoid
3329 a warning on a function we didn't instantiate because of excessive
3332 2005-11-06 Mark Mitchell <mark@codesourcery.com>
3334 * class.c (record_subobject_offsets): Don't record offsets past
3335 biggest empty class for non-empty base classes.
3336 (layout_class_type): Use TYPE_SIZE_UNIT, not TYPE_SIZE, when
3337 keeping track of the size of emptyclasses.
3340 * class.c (sizeof_biggest_empty_class): New variable.
3341 (record_subobject_offsets): Don't record offsets past biggest
3342 empty class for data members. Replace vbases_p parameter with
3343 is_data_member parameter.
3344 (build_base_field): Adjust call.
3345 (layout_class_type): Likewise. Maintain
3346 sizeof_biggest_empty_class.
3348 2005-11-05 Kazu Hirata <kazu@codesourcery.com>
3350 * decl2.c, init.c, typeck.c: Fix comment typos.
3352 2005-11-04 Richard Guenther <rguenther@suse.de>
3355 * init.c (build_vec_init): Build comparison of matching
3358 2005-11-03 Josh Conner <jconner@apple.com>
3361 pt.c (tsubst): Accept zero-length array if tf_error is set
3362 in complain flags. Change error message for negative-
3365 2005-11-04 Joseph S. Myers <joseph@codesourcery.com>
3367 * cp-tree.h (cp_cpp_error), error.c (cp_cpp_error): Take va_list*
3370 2005-11-03 Joseph S. Myers <joseph@codesourcery.com>
3373 * error.c (cp_cpp_error): New function.
3374 * cp-tree.h (cp_cpp_error): Declare.
3375 * parser.c (cp_lexer_new_main): Set CPP option client_diagnostic
3376 and error callback after lexing.
3378 2005-11-03 Mark Mitchell <mark@codesourcery.com>
3381 * pt.c (register_specialization): Update inline flags on clones.y
3383 2005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
3386 * decl.c (declare_local_label): Return 0 for variables
3387 with error_mark_node as their types.
3389 2005-11-02 Mark Mitchell <mark@codesourcery.com>
3392 * call.c (build_conditional_expr): Do bad conversions, if there's
3396 * parser.c (cp_parser_postfix_dot_deref_expression): Improve error
3397 message for use of overloaded functions on LHS of "." operator.
3400 * parser.c (cp_parser_postfix_expression): Use
3401 cp_parser_elaborated_type_specifier to handle typename-types in
3403 (cp_parser_enclosed_argument_list): Skip ahead to the end of the
3404 template argument list if the closing ">" is not found.
3407 * pt.c (instantiate_decl): Use cp_finish_decl, not
3408 finish_static_data_member_decl.
3410 2005-10-28 Andrew Pinski <pinskia@physics.uc.edu>
3412 * decl.c (grokfndecl): Remove the setting
3413 of the return type of the function type
3414 of main after erroring about must returning
3417 2005-10-28 Andrew Pinski <pinskia@physics.uc.edu>
3420 * decl.c (grokfndecl): Create a new function type
3421 after erroring out about main not returning int.
3423 2005-10-28 Josh Conner <jconner@apple.com>
3426 * parser.c (cp_parser_member_declaration): Detect and handle
3427 a template specialization.
3429 2005-10-28 Andrew Pinski <pinskia@physics.uc.edu>
3432 * decl.c (start_decl): Check that the decl is an
3433 error_mark_node before getting the type.
3434 Remove the check for the decl's type being an
3437 2005-10-21 Mark Mitchell <mark@codesourcery.com>
3440 * parser.c (cp_parser_init_declarator): Pass attributes to
3443 2005-10-20 Mark Mitchell <mark@codesourcery.com>
3446 * search.c (accessible_p): Check access in the outermost set of
3447 template parameters.
3449 2005-10-20 Richard Guenther <rguenther@suse.de>
3451 * decl.c (grokdeclarator): Fix ambiguous pedwarn message.