1 2009-01-12 Jakub Jelinek <jakub@redhat.com>
4 * decl.c (start_function): If grokdeclarator hasn't returned
5 FUNCTION_DECL nor error_mark_node, issue diagnostics.
7 2009-01-11 Jakub Jelinek <jakub@redhat.com>
10 * cp-gimplify.c (genericize_if_stmt): Renamed from ...
11 (gimplify_if_stmt): ... this.
12 (cp_gimplify_expr): Don't handle IF_STMT here.
13 (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
15 2009-01-10 Andrew Pinski <pinskia@gmail.com>
18 * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
21 * typeck2.c (build_functional_cast): Check for reference type and NULL
24 2009-01-09 Steve Ellcey <sje@cup.hp.com>
26 * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
28 2009-01-09 Jakub Jelinek <jakub@redhat.com>
31 * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
33 2009-01-09 John F. Carr <jfc@mit.edu>
36 * parser.c (cp_parser_class_specifier): Clear
37 parser->in_unbraced_linkage_specification_p while parsing class
40 2009-01-07 Jakub Jelinek <jakub@redhat.com>
43 * semantics.c (finish_goto_stmt): Convert destination to
46 2009-01-06 Jason Merrill <jason@redhat.com>
53 * pt.c (check_default_tmpl_args): Don't complain about
54 out-of-order parameter packs in the enclosing class
55 or parameter packs after default args.
56 (coerce_template_parms): If we have more than one
57 parameter pack, don't flatten argument packs.
58 (template_args_equal): Handle argument packs.
59 (comp_template_args): Don't flatten argument packs.
60 (check_instantiated_arg): Split out from...
61 (check_instantiated_args): Here. Handle arg packs.
62 (convert_template_argument): Just check that nontype argument
63 packs have the right type.
65 2009-01-05 Dodji Seketeli <dodji@redhat.com>
68 * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
70 2009-01-05 Jason Merrill <jason@redhat.com>
73 * typeck2.c (process_init_constructor_union): Handle union with
76 * mangle.c (write_expression): Remove mangling for zero-operand
80 * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
84 * class.c (defaultable_fn_p): Only operator== can be a copy
87 2009-01-02 Jason Merrill <jason@redhat.com>
90 * typeck2.c (process_init_constructor_union): Handle excess
92 (process_init_constructor_record): Likewise.
95 * typeck2.c (digest_init_r): Don't use process_init_constructor
96 for non-aggregate classes.
98 2008-12-31 Jakub Jelinek <jakub@redhat.com>
101 * parser.c (cp_parser_primary_expression) <case RID_FUNCTION_NAME>:
102 Return error_mark_node if cp_parser_non_integral_constant_expression
106 * semantics.c (finish_decltype_type): Handle TEMPLATE_PARM_INDEX.
108 2008-12-29 Jakub Jelinek <jakub@redhat.com>
111 * parser.c (cp_parser_condition): Use cp_parser_require
112 instead of cp_lexer_consume_token to consume =.
115 * decl.c (start_enum): If enumtype is error_mark_node, exit early.
117 2008-12-28 Jakub Jelinek <jakub@redhat.com>
120 * semantics.c (finish_omp_for): Don't add CLEANUP_POINT_EXPR
121 around volatile iteration var in condition and/or increment
124 2008-12-27 Jakub Jelinek <jakub@redhat.com>
127 * pt.c (tsubst_omp_for_iterator): RECUR on whole init_expr instead of
130 2008-12-21 Jason Merrill <jason@redhat.com>
133 * name-lookup.c (arg_assoc_type): Handle DECLTYPE_TYPE.
135 2008-12-20 Jakub Jelinek <jakub@redhat.com>
136 Manuel López-Ibáñez <manu@gcc.gnu.org>
139 * c-common.c (warn_about_parentheses): Remove ARG_UNUSED from
140 arg_left. Don't warn about X<=Y<=Z if comparison's type isn't
143 2008-12-19 Jakub Jelinek <jakub@redhat.com>
146 * call.c (build_new_method_call): Handle call being COMPOUND_EXPR
149 2008-12-18 Jakub Jelinek <jakub@redhat.com>
152 * init.c (perform_member_init): For value-initialized
153 references call permerror instead of warning and don't emit any
156 2008-12-18 Jason Merrill <jason@redhat.com>
159 * parser.c (cp_parser_token_starts_cast_expression): An EOF
160 can't start a cast-expression.
162 2008-12-17 Jason Merrill <jason@redhat.com>
164 * semantics.c (describable_type): New function.
165 (finish_decltype_type): Use it for dependent exprs.
166 * cp-tree.h: Declare it.
167 * mangle.c (write_type) [DECLTYPE_TYPE]: Set skip_evaluation.
168 (write_expression): If skip_evaluation, use type stubs.
169 * tree.c (cp_tree_equal): Handle PARM_DECLs from different
170 declarations of a function.
171 * init.c (build_new): Do auto deduction if type is describable.
172 * decl.c (cp_finish_decl): Likewise.
173 * parser.c (cp_parser_omp_for_loop): Likewise.
175 2008-12-10 Jason Merrill <jason@redhat.com>
178 * mangle.c (write_builtin_type): Add mangling for decimal floating
179 point and fixed point types.
180 (write_type): Pass FIXED_POINT_TYPE along.
182 2008-12-09 Mark Mitchell <mark@codesourcery.com>
185 * class.c (resolve_address_of_overloaded_function): Check
186 accessibility of member functions unless FLAGS indicates
188 * call.c (standard_conversion): Adjust flags passed to
190 (convert_default_arg): Do not perform access checks.
191 * cp-tree.h (tsubst_flags_t): Add tf_no_access_control.
193 2008-12-08 Steve Ellcey <sje@cup.hp.com>
195 * decl2.c (mark_used): Remove assemble_external call.
197 2008-12-08 Dodji Seketeli <dodji@redhat.com>
200 * name-lookup.c (kept_level_p): Don't forget the case of levels
201 having using directives.
203 2008-12-08 Richard Henderson <rth@redhat.com>
206 * class.c (finish_struct_bits): Use SET_TYPE_MODE.
207 * decl.c (record_unknown_type): Likewise.
208 (start_enum, finish_enum): Likewise.
210 2008-12-05 Jakub Jelinek <jakub@redhat.com>
213 * error.c (dump_expr): Handle BIT_FIELD_REF.
215 2008-12-05 Sebastian Pop <sebastian.pop@amd.com>
218 * Make-lang.in (cc1plus-dummy, cc1plus): Add BACKENDLIBS,
221 2008-12-04 Jason Merrill <jason@redhat.com>
224 * decl.c (grok_special_member_properties): Set TYPE_HAS_COMPLEX_DFLT
226 * class.c (check_bases_and_members): Rather than assuming any
227 user-declared default constructor is complex here.
229 2008-12-04 Richard Guenther <rguenther@suse.de>
232 * typeck.c (get_member_function_from_ptrfunc): Mark the vtbl
233 pointer access with TREE_NO_WARNING.
235 2008-12-03 Jason Merrill <jason@redhat.com>
238 * init.c (build_value_init): Do initial zero-initialization
239 of a class with an implicitly-defined constructor using
240 build_zero_init rather than in build_value_init.
241 (build_value_init_1): Fold into build_value_init.
244 * parser.c (cp_parser_conversion_type_id): Diagnose
245 'operator auto' here.
246 * decl.c (grokdeclarator): Not here.
249 * decl.c (grokdeclarator): Only set DECL_NONCONVERTING_P
250 on explicit constructors.
251 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Propagate
252 CONSTRUCTOR_IS_DIRECT_INIT.
254 2008-12-02 Jason Merrill <jason@redhat.com>
256 PR c++/35782, c++/37860
257 * call.c (build_user_type_conversion_1): Remember
259 (convert_like_real): Likewise.
260 (build_over_call): Don't require the copy constructor
261 for copy-list-initialization.
262 * cp-tree.h (TARGET_EXPR_LIST_INIT_P): New macro.
265 * decl.c (cp_finish_decl): Handle =default and =delete for
268 2008-12-01 Jakub Jelinek <jakub@redhat.com>
271 * parser.c (cp_parser_omp_for_loop): Handle auto.
272 * pt.c (tsubst_omp_for_iterator): Likewise.
274 2008-11-28 Jason Merrill <jason@redhat.com>
277 * init.c (perform_member_init): Fix value-initialization.
278 (build_value_init_1): Add assert to catch cases that will break
280 (build_default_init): Remove.
281 * cp-tree.h: Remove its prototype.
282 * pt.c (tsubst_expr) [DECL_EXPR]: Use build_value_init for
283 value-initialization.
286 * parser.c (cp_parser_class_name): Only call
287 maybe_note_name_used_in_class if we actually found a class name.
289 2008-11-25 Jason Merrill <jason@redhat.com>
292 * decl2.c (check_classfn): Error rather than abort on parameter
295 2008-11-20 Jason Merrill <jason@redhat.com>
298 * parser.c (cp_parser_class_name): Call maybe_note_name_used_in_class.
301 * call.c (build_over_call): Take the address of the function even
303 (build_new_method_call): Remember the type of the called function
306 2008-11-19 Dodji Seketeli <dodji@redhat.com>
309 * pt.c (coerce_template_template_parm): Use the more robust
310 uses_template_parms instead of dependent_type_p.
312 2008-11-19 Dodji Seketeli <dodji@redhat.com>
315 * pt.c (lookup_template_class): Check pointers before dereferencing
317 * error.c (dump_template_decl): Likewise.
319 2008-11-19 Jason Merrill <jason@redhat.com>
322 * decl2.c (grokfield): Pass ATTR_FLAG_TYPE_IN_PLACE for a typedef
323 that names a class for linkage purposes.
326 * parser.c (cp_parser_pseudo_destructor_name): A pseudo-destructor
327 name is not a declaration.
330 * pt.c (instantiate_decl): Don't require a definition of
331 a template that is explicitly instantiated 'extern'.
333 2008-11-18 Jason Merrill <jason@redhat.com>
334 Jakub Jelinek <jakub@redhat.com>
337 * parser.c (cp_parser_type_id): Complain about auto.
338 * decl.c (grokdeclarator): Complain about parameters and
339 conversion functions declared with auto.
341 * call.c (standard_conversion): Use CLASS_TYPE_P instead of
343 * cp-tree.h (TYPE_NON_AGGREGATE_CLASS): Likewise.
345 2008-11-17 Jakub Jelinek <jakub@redhat.com>
348 * init.c (constant_value_1): Handle TREE_LIST init.
350 2008-11-15 Jakub Jelinek <jakub@redhat.com>
353 * typeck.c (cp_build_unary_op): Don't call get_unwidened. Use
354 argtype instead of result_type.
356 2008-11-14 Jason Merrill <jason@redhat.com>
359 * semantics.c (finish_call_expr): Don't repeat arg-dep lookup
360 for a non-dependent call.
363 * call.c (build_aggr_conv): Increment i.
365 2008-11-13 Jason Merrill <jason@redhat.com>
368 * typeck2.c (process_init_constructor_record): Update bitfield
370 (check_narrowing): Update bitfield handling, print source type.
372 2008-11-12 Jakub Jelinek <jakub@redhat.com>
376 2007-05-07 Mike Stump <mrs@apple.com>
377 * parser.c (check_empty_body): Add.
378 (cp_parser_iteration_statement): Add call to check_empty_body.
380 2008-11-12 Jason Merrill <jason@redhat.com>
383 * typeck.c (cp_build_modify_expr): Update bitfield handling.
385 2008-11-12 Jakub Jelinek <jakub@redhat.com>
388 * parser.c (cp_parser_simple_declaration): Don't commit
389 to tentative parse if parse errors were seen.
392 * error.c (dump_expr): Handle COMPLEX_EXPR.
394 2008-11-10 Jakub Jelinek <jakub@redhat.com>
397 * parser.c (cp_parser_enum_specifier): After parsing :,
398 parse definitely. Don't return early if type specifier
401 2008-11-06 David Edelsohn <edelsohn@gnu.org>
404 * g++spec.c (LIBSTDCXX_STATIC): New.
405 (lang_spec_driver): Use LIBSTDCXX_STATIC when not
408 2008-11-05 Fabien Chene <fabien.chene@gmail.com>
411 * cp-tree.h: Fix DECL_NONSTATIC_MEMBER_P to handle member template
414 2008-11-05 Richard Guenther <rguenther@suse.de>
417 * decl.c (start_preparsed_function): Use the correct type for
418 building the RESULT_DECL.
420 2008-10-31 Jakub Jelinek <jakub@redhat.com>
423 * decl.c (grokdeclarator): Diagnose auto function decl without
424 late return type and late return type function decl where type
428 * decl.c (cp_finish_decl): Diagnose type_uses_auto type with
431 2008-10-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
434 * class.c (check_bitfield_decl): Rename min_precision to
435 tree_int_cst_min_precision.
436 * decl.c (finish_enum): Likewise.
438 2008-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
441 * parser.c (cp_parser_token_starts_cast_expression): New.
442 (cp_parser_cast_expression): Peek the next token to decide whether
443 this could be a parenthesized constructor or is definitely an
446 2008-10-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
449 * typeck.c (build_x_binary_op): Update call to
450 warn_about_parentheses.
451 * parser.c (cp_parser_binary_expression): Add note about passing
452 the correct code for unary expressions.
454 2008-10-24 Jakub Jelinek <jakub@redhat.com>
456 * Make-lang.in (check-c++-subtargets): New alias for
457 check-g++-subtargets.
458 (lang_checks_parallelized): Add check-g++.
459 (check_g++_parallelize): New variable.
461 2008-10-21 Richard Guenther <rguenther@suse.de>
463 * semantics.c (simplify_aggr_init_exprs_r): Remove.
464 (expand_or_defer_fn): Do not walk the function body to
465 simplify aggr_init_exprs.
467 2008-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
470 * typeck.c (cp_common_type): New. The same as
471 type_after_usual_arithmetic_conversions but without promotions.
472 (type_after_usual_arithmetic_conversions): Do the promotions and
474 (common_type): Make it behave like the C version of this
475 function. Do not handle pointer types.
476 (common_pointer_type): Move handling of pointer types from
478 (cp_build_binary_op): Use common_pointer_type instead of
479 common_type in call to pointer_diff.
480 Use cp_common_type instead of common_type.
481 * cp-tree.h (common_pointer_type): Declare.
483 2008-10-14 Jakub Jelinek <jakub@redhat.com>
486 * cp-gimplify.c (cp_genericize_r): Only fold_convert COND_EXPR
487 arguments if they don't already have COND_EXPR's type.
489 2008-10-14 Paolo Carlini <paolo.carlini@oracle.com>
492 * pt.c (push_template_decl_real): Check that current_template_parms
494 (process_partial_specialization): Assert current_template_parms not
497 2008-10-13 Doug Evans <dje@google.com>
499 * cp-tree.h (DECL_MAIN_P): Fix parentheses around expression.
501 2008-10-10 Jakub Jelinek <jakub@redhat.com>
504 * cp-gimplify.c (cp_genericize_r): Fix up bitfield operands of
507 2008-10-09 Jakub Jelinek <jakub@redhat.com>
510 * semantics.c (finalize_nrv_r): Clear DECL_INITIAL instead of
511 setting it to error_mark_node.
513 2008-10-07 Steve Ellcey <sje@cup.hp.com>
515 * decl.c (start_cleanup_fn): Declare as inline.
517 2008-10-06 Jason Merrill <jason@redhat.com>
519 PR c++/37376, other mangling issues
520 * mangle.c (write_type): Update TYPE_PACK_EXPANSION mangling.
521 (write_member_name): Break out from...
522 (write_expression): ...here. Handle dependent COMPONENT_REF.
523 (write_template_arg): Wrap an argument pack in 'I'/'E'.
524 (write_builtin_type): Update char16/32_t mangling.
525 (write_nested_name, write_prefix): Don't forget template args
527 * operators.def: Add ARROW_EXPR, update COMPONENT_REF and
530 2008-10-06 Aldy Hernandez <aldyh@redhat.com>
532 * typeck.c (build_x_indirect_ref): Add location argument.
533 (cp_build_binary_op): Pass location to warn_for_div_by_zero.
534 (cp_build_unary_op): Add location argument.
535 (cp_build_modify_expr): Same.
536 * class.c (build_base_path): Pass location to build_indirect_ref.
537 * semantics.c (handle_omp_for_class_iterator): Pass elocus to
540 2008-10-05 Dodji Seketeli <dodji@redhat.com>
543 * cp-gimplify.c (cp_gimplify_expr): For each USING_STMT
544 make sure an IMPORTED_DECL node is added to the BLOCK_VARS list
545 of the innermost containing BLOCK.
547 2008-10-03 Paolo Carlini <paolo.carlini@oracle.com>
550 * error.c (dump_function_decl): Save the exceptions in case of
551 error about incompatible specifications in a specialization.
553 2008-10-01 Andrew Pinski <andrew_pinski@playstation.sony.com>
555 * tree.c (lvalue_p_1): COMPOUND_LITERAL_EXPR is also an lvalue.
557 2008-09-30 H.J. Lu <hongjiu.lu@intel.com>
560 * parser.c (cp_parser_selection_statement): Fix uninitialized
563 2008-09-30 Simon Martin <simartin@users.sourceforge.net>
567 * decl.c (grokdeclarator): Set the type for typedefs to a
568 nested-name-specifier to error_mark_node.
570 2008-09-30 Paolo Bonzini <bonzini@gnu.org>
572 * parser.c (cp_parser_selection_statement): Implement here the
573 -Wempty-body warning for `if' and `else' statements.
574 * semantics.c (finish_if_stmt): Do not call empty_body_warning.
576 2008-09-25 Paolo Carlini <paolo.carlini@oracle.com>
579 * name-lookup.c (maybe_process_template_type_declaration): Check
580 return value of push_template_decl_real for error_mark_node.
582 2008-09-24 Aldy Hernandez <aldyh@redhat.com>
584 * semantics.c (finish_fname): Pass location to fname_decl.
586 2008-09-23 Jakub Jelinek <jakub@redhat.com>
589 * semantics.c (finish_omp_for): If processing_template_decl, just build
590 MODIFY_EXPR for init instead of calling cp_build_modify_expr.
592 2008-09-23 Aldy Hernandez <aldyh@redhat.com>
594 * typeck.c (build_array_ref): Pass location to cp_build_binary_op.
595 (get_member_function_from_ptrfunc): Same.
596 (build_x_binary_op): Same.
597 (build_binary_op): Same.
598 (cp_build_binary_op): New location argument.
599 (pointer_diff): Pass location to cp_build_binary_op.
600 (cp_truthvalue_conversion): Pass location to build_binary_op.
601 (convert_ptrmem): Pass location to cp_build_binary_op.
602 (cp_build_modify_expr): Same.
603 (build_ptrmemfunc): Same.
604 * init.c (expand_cleanup_for_base): Pass location to
605 c_common_truthvalue_conversion.
606 (build_new_1): Pass location to cp_build_binary_op.
607 (build_vec_delete_1): Pass location to *build_binary_op,
608 c_common_truthvalue_conversion.
609 (build_vec_init): Same.
610 (build_delete): Same.
611 * decl.c (compute_array_index_type): Same.
612 * call.c (build_new_op): Same.
613 * rtti.c (build_dynamic_cast_1): Same.
614 * cp-tree.h: Add argument to cp_build_binary_op.
615 * semantics.c (handle_omp_for_class_iterator): Pass location to
616 *build_binary_op, c_common_truthvalue_conversion.
617 * decl2.c (get_guard_cond): Same.
619 2008-09-17 Richard Guenther <rguenther@suse.de>
622 * rtti.c (build_dynamic_cast_1): Convert the COND_EXPR
623 result to the correct type.
625 2008-09-17 H.J. Lu <hongjiu.lu@intel.com>
628 * name-lookup.c (pushdecl_maybe_friend): Don't return the old
629 parameter for duplicate.
631 2008-09-17 Jason Merrill <jason@redhat.com>
634 * name-lookup.c (lookup_type_scope): Look through sk_function_parms.
636 2008-09-17 Jakub Jelinek <jakub@redhat.com>
639 * typeck.c (build_array_ref): Use protected_set_expr_location instead
640 of SET_EXPR_LOCATION when ret might not be an expression.
642 2008-09-17 Jan Hubicka <jh@suse.cz>
645 * cp/decl.c (start_method): Set DECL_NO_INLINE_WARNING_P.
647 2008-09-16 Jakub Jelinek <jakub@redhat.com>
650 * semantics.c (finish_compound_literal): Return error_mark_node if
654 * lex.c (init_reswords): Don't populate ridpointers for D_CONLY
657 2008-09-15 Aldy Hernandez <aldyh@redhat.com>
659 * decl.c (duplicate_decls): Call error_at.
660 (grokfndecl): New location argument. Use location if available.
661 (grokdeclarator): Pass declarator location to grokfndecl.
662 * cp-tree.h (struct cp_declarator): Update comment for id_loc.
663 * decl2.c (check_classfn): Use error_at.
664 * parser.c (cp_parser_init_declarator): Set function_start_locus
666 (cp_parser_member_declaration): Set id_loc for function declarators.
668 2008-09-09 Jan Hubicka <jh@suse.cz>
671 * pt.c (tsubst_decl): Do not copy DECL_STRUCT_FUNCTION pointer.
673 2008-09-09 Jakub Jelinek <jakub@redhat.com>
676 * tree.c (array_type_nelts_top): Add size_one_node instead of
679 2008-09-09 Jason Merrill <jason@redhat.com>
682 * pt.c (tsubst_copy) [PARM_DECL]: Don't abort if the parm has
685 2008-09-09 Jakub Jelinek <jakub@redhat.com>
688 * decl.c (build_enumerator): Handle previous value's DECL_INITIAL
689 being error_operand_p. Don't clear value if it was error_mark_node.
691 2008-09-09 Paolo Bonzini <bonzini@gnu.org>
693 * cp-objcp-common.h (LANG_HOOKS_EXPAND_DECL): Remove.
694 * cp-tree.h: Don't mention DECL_ANON_UNION_ELEMS.
695 * semantics.c (anon_aggr_type_p): Remove.
697 2008-09-06 Jason Merrill <jason@redhat.com>
700 * parser.c (cp_parser_parameter_declaration_list): Process the
701 PARM_DECLs as we go and push them. Return a TREE_LIST.
702 (cp_parser_parameter_declaration_clause): Return a TREE_LIST.
703 (cp_parser_direct_declarator): Create a binding level and
704 suppress deprecated warnings in the parameter list.
705 (make_call_declarator): PARMS is now a tree.
706 * cp-tree.h (struct cp_declarator): Function parms are now a tree.
707 * decl.h (enum deprecated_states, deprecated_state): Move here.
709 (type_is_deprecated): New fn.
710 (grokparms): PARMLIST is a tree now. Warn about parms that
711 use deprecated types.
712 * mangle.c (write_expression): Handle PARM_DECL, CALL_EXPR and
714 * pt.c (tsubst) [DECLTYPE_TYPE]: Set skip_evaluation.
715 (tsubst_copy) [PARM_DECL]: Handle a PARM_DECL used outside of a
717 * name-lookup.c (pushtag): Look through function parameter scopes.
718 (pushdecl_maybe_friend): Don't set DECL_CONTEXT on a PARM_DECL
719 when we're parsing a function declarator.
721 2008-09-05 Douglas Gregor <doug.gregor@gmail.com>
724 * tree.c (cp_build_qualified_type_real): Deal with sharing of
725 TYPE_LANG_SPECIFIC in the canonical types of pointer-to-method
728 2008-09-04 Ian Lance Taylor <iant@google.com>
730 * parser.c (check_no_duplicate_clause): Change code parameter to
731 enum omp_clause_code.
733 2008-09-03 Jakub Jelinek <jakub@redhat.com>
736 * decl.c (cp_finish_decl): Only set
737 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P if decl is VAR_DECL.
740 * cp-tree.h (defer_mark_used_calls, deferred_mark_used_calls): New
742 * decl2.c (mark_used): If defer_mark_used_calls, push decl into
743 deferred_mark_used_calls vector and exit early.
744 * decl.c (defer_mark_used_calls, deferred_mark_used_calls): New
746 (finish_function): Set defer_mark_used_calls for the duration of the
747 function. Call mark_used on any queued decls.
749 2008-09-02 Jason Merrill <jason@redhat.com>
752 * call.c (build_over_call): Make =delete work with SFINAE.
753 * class.c (resolve_address_of_overloaded_function): Likewise.
755 * cp-tree.h (struct lang_decl_flags): Rename threadprivate_p to
756 threadprivate_or_deleted_p.
757 (CP_DECL_THREADPRIVATE_P): Adjust.
758 (DECL_DELETED_FN): Likewise.
759 (SD_UNINITIALIZED, SD_INITIALIZED, SD_DEFAULTED): New macros.
760 (SD_DELETED): New macro.
761 * parser.c (cp_parser_init_declarator): Use them.
762 * decl.c (start_decl): Use them.
764 * decl2.c (mark_used): Give =deleted error even in sizeof.
766 * typeck2.c (check_narrowing): Downgrade narrowing error to
769 2008-09-02 Aldy Hernandez <aldyh@redhat.com>
771 * typeck.c (build_array_ref): Use new location argument.
772 * class.c (build_vtbl_ref_1): Pass location to build_array_ref.
773 * call.c (build_new_op): Same.
774 * decl2.c (grok_array_decl): Same.
775 * cp-tree.h (build_array_ref): Add location argument to prototype.
777 2008-09-01 Aldy Hernandez <aldyh@redhat.com>
779 * typeck.c (build_x_indirect_ref): Add location argument.
780 * class.c (build_base_path): Pass location to build_indirect_ref.
781 * pt.c (tsubst_copy_and_build): Pass location to
782 finish_label_address_expr.
783 * parser.c (cp_parser_unary_expression): Same.
785 2008-08-31 Jason Merrill <jason@redhat.com>
787 Implement late-specified return type using 'auto'.
788 * cp-tree.h (struct cp_declarator): Add late_return_type field to
790 * parser.c (cp_parser_late_return_type_opt): New fn.
791 (cp_parser_direct_declarator): Use it.
792 (make_call_declarator): Put it in the declarator.
793 * decl.c (grokdeclarator): Splice in late-specified return type.
794 * pt.c (splice_late_return_type): New fn.
796 2008-08-29 Michael Meissner <gnu@the-meissners.org>
798 * decl.c (builtin_function_1): Take a bool argument to decide
799 whether to use pushdecl or pushdecl_top_level.
800 (duplicate_decls): Copy function specific target and optimization
801 options on duplicate declarations.
802 (cxx_builtin_function): Update builtin_function_1 call.
803 (cxx_builtin_function_ext_scope): New function, guarantee that the
804 declaration is done at global scope.
806 * cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE): New
807 macro, define builtin function hook for delayed machine specific
810 * cp-tree.h (cxx_builtin_function_ext_scope): Add declaration.
812 2008-08-30 Jason Merrill <jason@redhat.com>
815 * pt.c (dependent_type_p): Don't abort on auto outside of a template.
817 2008-08-29 Jason Merrill <jason@redhat.com>
819 Implement C++0x 'auto' semantics.
820 * decl.c (start_decl_1): Don't complain about auto being incomplete.
821 (cp_finish_decl): Deduce auto.
822 * init.c (build_new): Handle 'new auto'.
823 * typeck2.c (cxx_incomplete_type_diagnostic): Give a different
824 message for auto than for normal template type parms.
825 * pt.c (type_dependent_expression_p): Handle { }.
826 (make_auto): New function.
827 (listify_autos): New function.
828 (do_auto_deduction): New function.
829 (is_auto): New function.
830 (type_uses_auto): New function.
831 * cp-tree.h: Declare them.
832 * parser.c (cp_parser_decl_specifier_seq): In C++0x mode, don't
833 treat auto as a declspec.
834 (cp_parser_simple_type_specifier): It's a type-specifier.
836 2008-08-29 Mark Mitchell <mark@codesourcery.com>
838 * mangle.c (write_type): Add target-specific manglings for
839 non-fundamental types to the substitution table.
842 2008-08-29 Jakub Jelinek <jakub@redhat.com>
846 * name-lookup.c (do_using_directive, cp_emit_debug_info_for_using):
847 Adjust debug_hooks->imported_module_or_decl callers.
849 2008-08-29 Jan Hubicka <jh@suse.cz>
851 * cp-gimplify.c (cp_gimplify_expr): Add PRED_CONTINUE heuristic.
853 2008-08-28 Paolo Carlini <paolo.carlini@oracle.com>
856 * decl.c (reshape_init_r): Check init for error_mark_node.
858 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
861 * semantics.c (maybe_convert_cond): Call verify_sequence_points.
862 (finish_return_stmt): Likewise.
863 (finish_switch_condition): Likewise.
865 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
867 * cp-tree.h: Fix #error directive.
869 2008-08-26 Douglas Gregor <doug.gregor@gmail.com>
871 * typeck.c (type_after_usual_arithmetic_conversions): Don't do the
872 usual arithmetic conversions on scoped enumeration types.
873 (common_type): Ditto.
874 (default_conversion): Don't perform integral promotions on scoped
876 (build_array_ref): Scoped enumeration types can't be used as
878 * decl.c (start_enum): If building a C++0x scoped enumeration,
879 enter its scope. If provided with an underlying type, check that
880 underlying type and set up the enumeration type accordingly.
881 (finish_enum): Only compute an underlying type if the underlying
882 type isn't already fixed, and only convert the enumerator values
883 now if we've just computed the underlying type. Finish the scope
884 of C++0x scoped enumerations.
885 (build_enumerator): For enumerations with a fixed underlying type,
886 check the enumerator values when the enumerator is defined.
887 (lookup_enumerator): New.
888 * call.c (standard_conversion): Don't allow assignment from
889 integers to scoped enumeration types, even with -fpermissive.
890 Don't convert from scoped enumerations to bool or any arithmetic
892 (build_conditional_expr): Don't per the usual arithmetic
893 conversions for scoped enumeration types.
894 (convert_like_real): Check complain to see if we should
896 * error.c (class_key_or_enum_as_string): Print scoped enums.
897 * cp-tree.h (MAYBE_CLASS_TYPE_P): Check CLASS_TYPE_P, not
899 (INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P): New.
900 (SCOPED_ENUM_P): New.
901 (UNSCOPED_ENUM_P): New.
902 (SET_SCOPED_ENUM_P): New.
903 (ENUM_UNDERLYING_TYPE): New.
904 * pt.c (lookup_template_class): Update the instantiation of enum
905 types to deal with C++0x scoped enumerations and underlying
907 * name-lookup.c (begin_scope): Deal with scoped enumeration
909 (lookup_qualified_name): Deal with lookup into enumeration types.
910 * name-lookup.h (enum scope_kind): Add sk_scoped_enum.
911 * parser.c (cp_parser_class_or_namespace_name): Rename to...
912 (cp_parser_qualifying_entity): ... this. Also, in C++0x mode,
913 parse a type-name that can be an enumeration type.
914 (cp_parser_nested_name_specifier_opt): Update with C++0x grammar.
915 (cp_parser_elaborated_type_specifier): Parse the
916 optional `struct' or `class' following enum (in C++0x).
917 (cp_parser_enum_specifier): Parse C++0x scoped enumerations and
920 2008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
922 * typeck.c: Update all calls to pedwarn.
927 * name-lookup.c: Likewise.
928 * parser.c: Likewise.
930 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
933 * parser.c (cp_parser_omp_for_loop): Handle parenthesized
936 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
938 * parser.c: Update all calls to inform.
939 * typeck.c: Likewise.
943 * method.c: Likewise.
944 * friend.c: Likewise.
945 * typeck2.c: Likewise.
947 * name-lookup.c: Likewise.
950 2008-08-19 Jakub Jelinek <jakub@redhat.com>
953 * error.c (cp_print_error_function): Deal with recursive BLOCK trees.
955 2008-08-18 Tomas Bily <tbily@suse.cz>
957 * tree.c (cp_tree_equal): Use CONVERT_EXPR_CODE_P.
959 2008-08-18 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
961 * typeck.c: Update all callers of permerror.
966 * except.c: Likewise.
968 * typeck2.c: Likewise.
970 * semantics.c: Likewise.
971 * name-lookup.c: Likewise.
974 * parser.c: Likewise.
976 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
979 * pt.c (check_template_shadow): Change to return a bool.
980 * name-lookup.c (push_class_level_binding): Early return if
981 check_template_shadow returns false.
982 * cp-tree.h (check_template_shadow): Adjust declaration.
984 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
987 * decl.c (grokdeclarator): In case of extern and initializer, return
988 error_mark_node after the error.
990 2008-08-13 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
993 * decl.c (grokfndecl): Call check_main_parameters_type only if
996 2008-08-12 Paolo Carlini <paolo.carlini@oracle.com>
999 * parser.c (cp_parser_class_head): Early return error_mark_node in
1000 case of global qualification of class name or qualified name that
1001 does not name a class.
1003 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1006 * cvt.c (ocp_convert): Warn for out-of-range conversions to enum.
1008 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1011 * cp-tree.h (struct diagnostic_context, struct diagnostic_info):
1012 Delete forward declarations. Check that toplev.h has not been
1013 included before this file. Include toplev.h and diagnostic.h.
1014 * error.c (cp_cpp_error): Use DK_PEDWARN.
1015 (cxx_incomplete_type_diagnostic): Update declaration.
1016 (cxx_incomplete_type_error): Use DK_ERROR.
1017 * typeck2.c (cxx_incomplete_type_diagnostic): Take a diagnostic_t
1018 as argument. Use emit_diagnostic.
1019 (cxx_incomplete_type_error): Use DK_ERROR.
1020 (add_exception_specifier): Use diagnostic_t instead of custom
1022 * typeck.c (complete_type_or_else): Update call to
1023 cxx_incomplete_type_diagnostic.
1024 * init.c (build_delete): Likewise.
1025 * call.c (diagnostic_fn_t): Remove unused typedef.
1026 (build_temp): Pass a pointer to diagnostic_t.
1027 (convert_like_real): Use emit_diagnostic.
1028 (joust): Check return value of warning before giving informative
1030 * friend.c (do_friend): Check return value of warning
1031 before giving informative note.
1032 * parser.c (cp_parser_template_id): Likewise.
1034 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1037 * class.c (check_bases_and_members): Warn with -Wuninitialized
1040 2008-08-08 Volker Reichelt <v.reichelt@netcologne.de>
1043 * decl.c (xref_basetypes): Check base for MAYBE_CLASS_TYPE_P,
1044 and make sure it is not a union.
1046 2008-08-07 H.J. Lu <hongjiu.lu@intel.com>
1048 * semantics.c (finish_decltype_type): Initialize type.
1050 2008-08-07 Douglas Gregor <doug.gregor@gmail.com>
1052 * semantics.c (finish_decltype_type): Handle calls to function
1053 pointers and references to functions properly.
1055 2008-08-06 Douglas Gregor <doug.gregor@gmail.com>
1058 * parser.c (cp_parser_template_argument): Don't assume that '>>'
1059 following a type-id is an error when in C++0x mode.
1061 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1064 * decl.c (grokdeclarator): Use explicit location with permerror_at.
1066 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1069 * typeck.c (cp_build_binary_op): Move code to c-common.c.
1071 2008-08-05 Jason Merrill <jason@redhat.com>
1074 * decl.c (build_ptrmemfunc_type): Don't require structural
1075 comparison of PMF types.
1076 * tree.c (cp_build_qualified_type_real): Don't clear
1077 a valid TYPE_PTRMEMFUNC_TYPE.
1078 * typeck.c (cp_build_unary_op): Still do build_ptrmemfunc in
1081 2008-08-04 Jason Merrill <jason@redhat.com>
1084 * typeck2.c (check_narrowing): Allow narrowing conversion
1085 from an explicit floating-point constant.
1088 * pt.c (tsubst_decl): Leave DECL_INITIAL set on deleted
1091 2008-08-04 Simon Baldwin <simonb@google.com>
1094 * parser.c (cp_parser_elaborated_type_specifier): Warn only when
1095 the declaration's id is followed by a semicolon.
1097 2008-07-31 Jakub Jelinek <jakub@redhat.com>
1100 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Call
1101 complete_type_or_else even for UNKNOWN_TYPE to get diagnostics.
1103 2008-07-31 Jason Merrill <jason@redhat.com>
1106 * init.c (build_new_1): Don't convert pointer to the data type
1107 until we're actually going to treat it as that type.
1110 * tree.c (build_aggr_init_expr): Split out...
1111 (build_cplus_new): ...from here.
1112 (stabilize_init): Don't mess with AGGR_INIT_EXPR either.
1113 * init.c (build_new_1): new T() means value-initialization,
1114 not default-initialization.
1115 (build_vec_init): Likewise.
1116 (build_value_init_1): Use build_aggr_init_expr.
1118 2008-07-30 Dodji Seketeli <dseketel@redhat.com>
1121 * decl2.c (fix_temporary_vars_context_r): New function.
1122 (one_static_initialization_or_destruction): Make sure temporary
1123 variables part of the initialiser have their DECL_CONTEXT()
1126 2008-07-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1129 * typeck.c (build_binary_op): Encapsulate code into
1132 2008-07-29 Jakub Jelinek <jakub@redhat.com>
1135 * tree.c (cplus_array_hash, build_cplus_array_type_1): Hash on
1136 TYPE_UID instead of pointers.
1138 2008-07-29 Jan Hubicka <jh@suse.cz>
1140 * optimize.c (maybe_clone_body): Remove DECL_INLINE.
1141 * decl.c (duplicate_decls): Likewise.
1142 (grokfndecl): Likewise.
1143 (start_method): Likewise.
1144 * method.c (make_thunk, make_alias_for, implicitly_declare_fn):
1146 * pt.c (register_specialization, regenerate_decl_from_template):
1148 * decl2.c (grokfield): Likewise.
1150 2008-07-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1153 * decl.c (duplicate_decls): Merge USED flags.
1155 2008-07-27 Jason Merrill <jason@redhat.com>
1158 * decl.c (reshape_init_r): Allow C++0x initializer lists.
1160 2008-07-28 Richard Guenther <rguenther@suse.de>
1162 Merge from gimple-tuples-branch.
1164 2008-07-22 Aldy Hernandez <aldyh@redhat.com>
1166 * cp-gimplify.c (gimplify_if_stmt): Set location on newly created
1169 2008-07-18 Jakub Jelinek <jakub@redhat.com>
1171 * decl.c (finish_function): Call gimple_body after cp_genericize.
1173 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
1175 * optimize.c: Include gimple.h instead of tree-gimple.h.
1176 * Make-lang.in (cp-gimplify.o): Depend on tree-iterator.h.
1177 * cp-gimplify.c: Rename tree-gimple.h to gimple.h. Include
1180 2008-07-16 Jakub Jelinek <jakub@redhat.com>
1182 * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE for the clone.
1184 2008-07-14 Jakub Jelinek <jakub@redhat.com>
1186 * cp-gimplify.c (cp_gimplify_expr): Update comment.
1188 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
1190 * cp-tree.h (union lang_tree_node): Rename GENERIC_NEXT to
1192 * cp-gimplify.c (cxx_omp_clause_apply_fn): Rename
1193 GIMPLE_MODIFY_STMT to MODIFY_EXPR.
1194 (cxx_omp_clause_copy_ctor): Same.
1195 (cxx_omp_clause_assign_op): Same.
1197 2008-05-28 Jakub Jelinek <jakub@redhat.com>
1199 * cp-gimplify.c (cp_gimplify_omp_for): Add pre_p argument. Tuplify.
1200 (cp_gimplify_expr): Adjust caller.
1202 2008-05-11 Doug Kwan <dougkwan@google.com>
1204 * init.c (build_vec_delete): Add type conversion for argument
1205 0 of POINTER_PLUS_EXPR.
1207 2008-04-29 Doug Kwan <dougkwan@google.com>
1209 * decl2 (File): Include "gimple.h"
1210 (cp_write_global_declarations): Use gimple_body instead of
1212 * Make-lang.in (cp/decl2.o): Add $(GIMPLE_H)
1214 2008-04-10 Diego Novillo <dnovillo@google.com>
1216 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00913.html
1218 * optimize.c (maybe_clone_body): Re-enable call to
1220 * cp-gimplify.c (cp_gimplify_omp_for): Mark disabled
1221 code with call to gimple_unreachable.
1222 (cp_genericize): Fix handling of clone bodies.
1224 2008-04-04 Diego Novillo <dnovillo@google.com>
1226 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00413.html
1228 * optimize.c (maybe_clone_body): Re-enable.
1230 2008-02-19 Diego Novillo <dnovillo@google.com>
1231 Oleg Ryjkov <olegr@google.com>
1233 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
1235 * cp-gimplify.c (gimplify_for_stmt): Change gimple_seq
1236 argument to gimple_seq *. Update all users.
1237 (gimplify_must_not_throw_expr): Likewise.
1239 2008-02-04 Oleg Ryjkov <olegr@google.com>
1241 * except.c: Include gimple.h
1242 (cp_protect_cleanup_actions): Convert to tuples.
1243 * Make-lang.in (cp/except.o): Add dependency on gimple.h
1245 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
1247 * cp-gimplify.c (gimplify_cp_loop): Call tree_annotate_all_with_locus
1248 instead of annotating each block manually.
1250 2007-10-30 Aldy Hernandez <aldyh@redhat.com>
1252 * cp-gimplify.c (gimplify_cp_loop): Tuplify.
1253 (gimplify_for_stmt): Same.
1254 (gimplify_switch_stmt): Same.
1255 (cp_gimplify_expr): [FOR_STMT]: Do not call gimplify_for_stmt. Return
1257 [WHILE_STMT]: Return GS_OK.
1258 [SWITCH_STMT]: Same.
1259 [CONTINUE_STMT]: Same.
1261 (cp_genericize): Set gimple_body() of cloned functions when needed.
1263 2007-10-29 Aldy Hernandez <aldy@quesejoda.com>
1265 * cp-gimplify.c: Move build_gimple_eh_filter_tree here.
1266 (cp_gimplify_init_expr): Convert to tuples.
1267 (gimplify_must_not_throw_expr): Make function return a
1268 gimplify_status and convert to tuples.
1270 2007-10-18 Aldy Hernandez <aldy@quesejoda.com>
1272 * cp-gimplify.c (genericize_try_block): Enable and do not call
1274 (genericize_catch_block): Same.
1275 (genericize_eh_spec_block): Same.
1276 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
1277 (cp_gimplify_expr): Enable TRY_BLOCK, HANDLER, and EH_SPEC_BLOCK.
1279 2007-10-16 Aldy Hernandez <aldy@quesejoda.com>
1281 * optimize.c (maybe_clone_body): Comment out call to clone_body.
1282 * decl.c (finish_function): Use gimple_body instead of
1284 * cp-tree.h (cp_gimplify_expr): Last 2 arguments are sequences.
1285 * cp-gimplify.c (genericize_try_block): Comment out.
1286 (genericize_catch_block): Same.
1287 (genericize_eh_spec_block): Same.
1288 (gimplify_cp_loop): Comment out calls to gimplify_stmt.
1289 (gimplify_for_stmt): Comment out.
1290 (gimplify_switch_stmt): Comment out call to gimplify_stmt.
1291 (cp_gimplify_omp_for): Same.
1292 (gimplify_must_not_throw_expr): Argument pre_p is a sequence.
1293 Comment out call to gimplify_stmt and append_to_statement_list.
1294 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
1295 (cp_gimplify_init_expr): Arguments pre_p and post_p are sequences.
1296 (cp_gimplify_expr): Same.
1297 Comment out calls to genericize_*_block. Comment out call to
1300 2008-07-27 H.J. Lu <hongjiu.lu@intel.com>
1303 * class.c (type_has_user_provided_default_constructor): Handle
1306 2008-07-27 Paolo Carlini <paolo.carlini@oracle.com>
1308 * decl.c (push_library_fn): Add a parameter for the exceptions that
1309 the function may throw.
1310 (push_void_library_fn, push_throw_library_fn, expand_static_init):
1312 (build_library_fn): Change to static.
1313 * cp-tree.h: Adjust declarations.
1314 * except.c (declare_nothrow_library_fn): New.
1315 (do_get_exception_ptr, do_begin_catch, do_free_exception,
1316 do_allocate_exception): Use the latter, adjust the declarations
1317 (ie, add empty exception-specification), consistently with the
1318 actual implementation in libsupc++.
1320 2008-07-25 Jan Hubicka <jh@suse.cz>
1322 * typeck.c (inline_conversion): Remove.
1323 (cp_build_function_call): Do not use inline_conversion.
1324 * decl.c (duplicate_decls): Do not insist on inline being declared
1326 (start_cleanup_fn): Do not assume that INLINE flags prevent function
1327 from being output. We now remove static functions always.
1328 (finish_function): Do return warning on all static functions.
1329 * call.c (build_over_call): Do not use inline_conversion.
1330 * cp-tree.h (possibly_inlined_p): Declare.
1331 (inline_conversion): Remove.
1332 * pt.c (instantiate_decl): Use possibly_inlined_p predicate.
1333 * decl2.c (cp_write_global_declarations): Likewise.
1334 (mark_used): Likewise.
1335 (possibly_inlined_p): New functions.
1337 2008-07-25 Jason Merrill <jason@redhat.com>
1339 * class.c (type_has_user_provided_default_constructor): Handle
1342 2008-07-23 Jan Hubicka <jh@suse.cz>
1344 * decl.c (duplicate_decls): Update comment and unit-at-a-time.
1345 (grogfndecl): Drop flag_inline_trees code.
1346 * pt.c (instantiate_decl): Drop flag_iline_trees code.
1347 * lex.c (cxx_init): Do not set unit-at-a-time.
1349 2008-07-23 Jason Merrill <jason@redhat.com>
1351 * mangle.c (write_unqualified_name): Avoid infinite recursion when
1352 trying to mangle a decl with no name.
1354 Implement defaulted/deleted functions as per N2346
1355 * cp-tree.h (struct lang_decl_flags): Add defaulted_p bitfield.
1356 (DECL_DELETED_FN): New macro.
1357 (DECL_DEFAULTED_FN): New macro.
1358 * class.c (user_provided_p): New fn.
1359 (defaultable_fn_p): New fn.
1360 (type_has_user_provided_constructor): New fn.
1361 (type_has_user_provided_default_constructor): New fn.
1362 (check_methods): A defaulted fn is still trivial.
1363 (check_bases_and_members): Likewise.
1364 * decl.c (grok_special_member_properties): Likewise.
1365 (duplicate_decls): Complain about redeclaring a function as deleted.
1366 (start_decl): initialized==2 means deleted.
1367 (cp_finish_decl): Handle deleted/defaulted semantics.
1368 * decl2.c (grokfield): Likewise.
1369 (mark_used): Check DECL_DEFAULTED_FN instead of DECL_ARTIFICIAL.
1370 Complain about using a deleted fn.
1371 * init.c (build_value_init_1): Use type_has_user_provided_constructor.
1372 (perform_member_init): Check for a user-provided default constructor
1373 even if TYPE_NEEDS_CONSTRUCTING.
1374 (build_new_1): Likewise.
1375 * call.c (build_over_call): Don't call mark_used twice.
1376 * method.c (implicitly_declare_fn): Set DECL_DEFAULTED_FN.
1377 * search.c (check_final_overrider): Check for deleted mismatch.
1378 * parser.c (cp_parser_init_declarator): Tell start_decl about =delete.
1379 (cp_parser_pure_specifier): Handle =default and =delete.
1381 * error.c (maybe_warn_cpp0x): Suggest -std=gnu++0x as well.
1383 2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1386 * typeck.c: All calls to pedwarn changed.
1387 * decl.c: All calls to pedwarn changed.
1388 * call.c: All calls to pedwarn changed.
1389 * error.c: All calls to pedwarn changed.
1390 * typeck2.c: All calls to pedwarn changed.
1391 * pt.c: All calls to pedwarn changed.
1392 * name-lookup.c: All calls to pedwarn changed.
1393 * parser.c: All calls to pedwarn changed.
1395 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1397 * call.c: Fix comment typos.
1398 * class.c: Likewise.
1399 * cp-tree.h: Likewise.
1400 * cxx-pretty-print.c: Likewise.
1403 * name-lookup.c: Likewise.
1404 * operators.def: Likewise.
1405 * parser.c: Likewise.
1408 * typeck.c: Likewise.
1410 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
1414 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Only check
1415 copy constructors and copy assignment operators proper.
1417 2008-07-21 Rafael Ávila de Espíndola <espindola@google.com>
1419 * parser.c (cp_token): Remove in_system_header.
1420 (eof_token): Remove in_system_header.
1421 (cp_lexer_get_preprocessor_token): Don't set in_system_header.
1422 (cp_lexer_set_source_position_from_token): Don't set in_system_header.
1423 (cp_parser_member_declaration): Use in_system_header_at.
1424 * pt.c (lookup_template_class): Don't set DECL_IN_SYSTEM_HEADER.
1425 (pop_tinst_level): Don't set in_system_header.
1426 (instantiate_class_template): Don't set in_system_header.
1427 (instantiate_decl): Don't set in_system_header.
1428 (instantiate_pending_templates): Don't set in_system_header.
1430 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
1433 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Use
1434 TYPE_NOTHROW_P, not TREE_NOTHROW.
1435 (trait_expr_value): Likewise.
1437 2008-07-18 Dodji Seketeli <dseketel@redhat.com>
1440 * call.c (convert_like_real): Don't take the error code path
1441 when a rvalue or base conversion has the bad_p field set.
1443 2008-07-18 Kris Van Hees <kris.van.hees@oracle.com>
1445 * rtti.c (emit_support_tinfos): Add char16_type_node and
1447 * typeck2.c (digest_init): Support char16_t and char32_t.
1449 2008-07-18 Kavih R. Ghazi <ghazi@caip.rutgers.edu>
1451 * cvt.c (convert_to_void): Avoid C++ keywords.
1452 * decl.c (walk_namespaces_r, wrapup_globals_for_namespace):
1454 * friend.c (is_friend): Likewise.
1455 * init.c (perform_member_init): Likewise.
1456 * mangle.c (write_template_prefix, write_template_template_param):
1458 * name-lookup.c (do_namespace_alias, do_using_directive,
1459 parse_using_directive, ambiguous_decl, arg_assoc): Likewise.
1460 * parser.c (cp_parser_template_id, cp_parser_namespace_definition,
1461 cp_parser_objc_typename, cp_parser_objc_method_keyword_params):
1463 * pt.c (is_specialization_of_friend, lookup_template_class,
1464 push_tinst_level, instantiate_class_template,
1465 tsubst_copy_and_build): Likewise.
1466 * tree.c (add_stmt_to_compound): Likewise.
1467 * typeck.c (finish_class_member_access_expr): Likewise.
1469 2008-07-17 Julian Brown <julian@codesourcery.com>
1470 Mark Mitchell <mark@codesourcery.com>
1472 * decl2.c (determine_visibility): Allow target to override
1473 visibility of class data.
1475 2008-07-17 Paolo Carlini <paolo.carlini@oracle.com>
1478 * semantics.c (trait_expr_value): Update __has_trivial_destructor
1479 semantics to the current WP (N2691).
1481 2008-07-16 Dodji Seketeli <dseketel@redhat.com>
1484 * name-lookup.c (lookup_extern_c_fun_binding_in_all_ns): New function.
1485 (pushdecl_maybe_friend): Check if a redeclaration of extern C function
1486 complies with exception specification constraints.
1488 2008-07-14 Jason Merrill <jason@redhat.com>
1490 * lex.c (init_reswords): Always set D_OBJC.
1492 2008-07-11 Tom Tromey <tromey@redhat.com>
1493 Ian Lance Taylor <iant@google.com>
1495 * lex.c (struct resword, reswords): Don't define.
1496 (D_EXT, D_ASM, D_OBJC, D_CXX0X): Don't define.
1497 (init_reswords): Clarify mask code. Use c_common_reswords rather
1500 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1503 * decl.c (grokdeclarator): Warn about initializing variables
1504 of storage class 'extern' only after the type of the declarator
1505 has been properly computed.
1507 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1510 * cp-tree.h (struct cp_decl_specifier_seq): Add a location field. It
1511 carries the location of the primary type.
1512 * parser.c (cp_parser_check_type_definition): Update documentation.
1513 (cp_parser_check_for_definition_in_return_type,
1514 cp_parser_check_for_invalid_template_id,
1515 cp_parser_set_decl_spec_type,
1516 cp_parser_check_for_definition_in_return_type,
1517 cp_parser_diagnose_invalid_type_name,
1518 cp_parser_new_expression, cp_parser_explicit_instantiation,
1519 cp_parser_type_specifier, cp_parser_simple_type_specifier,
1520 cp_parser_omp_for_loop, cp_parser_pragma): Use location in error
1523 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1527 * semantic.c (qualified_name_lookup_error, finish_id_expression):
1528 Add a location_t parameter so that
1529 error message can have a more accurate location.
1530 * cp-tree.h: Updated prototype
1531 * pt.c (tsubst_qualified_id): Use location in error messages.
1532 * parser.c (cp_parser_postfix_expression,
1533 cp_parser_objc_statement, cp_parser_trait_expr,
1534 cp_parser_token_is_class_key,
1535 cp_parser_uncommitted_to_tentative_parse_p,
1536 cp_parser_check_for_invalid_template_id, cp_parser_is_string_literal,
1537 cp_parser_error, cp_parser_name_lookup_error,
1538 cp_parser_simulate_error, cp_parser_check_decl_spec,
1539 cp_parser_check_decl_spec, cp_parser_non_integral_constant_expression,
1540 cp_parser_diagnose_invalid_type_name,
1541 cp_parser_parse_and_diagnose_invalid_type_name,
1542 cp_parser_require_pragma_eol, cp_parser_make_typename_type,
1543 cp_parser_string_literal, cp_parser_primary_expression,
1544 cp_parser_primary_expression, cp_parser_unqualified_id,
1545 cp_parser_nested_name_specifier_opt, cp_parser_postfix_expression,
1546 cp_parser_postfix_dot_deref_expression, cp_parser_new_expression,
1547 cp_parser_direct_new_declarator, cp_parser_builtin_offsetof,
1548 cp_parser_label_for_labeled_statement, cp_parser_statement_seq_opt,
1549 cp_parser_jump_statement, cp_parser_block_declaration,
1550 cp_parser_simple_declaration, cp_parser_decl_specifier_seq,
1551 cp_parser_function_specifier_opt, cp_parser_decltype,
1552 cp_parser_mem_initializer_list, cp_parser_mem_initializer,
1553 cp_parser_mem_initializer_id, cp_parser_template_parameter,
1554 cp_parser_type_parameter, cp_parser_template_id,
1555 cp_parser_template_name, cp_parser_template_argument): Likewise.
1557 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1560 * pt.c (tsubst_function_type): Remove warning for type qualifiers
1561 on function return type.
1563 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1566 * pt.c (tsubst_function_type): Don't warn for type qualifiers
1567 on function return type in case of system header.
1569 2008-07-09 Raksit Ashok <raksit@google.com>
1571 * parser.c (cp_parser_postfix_expression): New warning based on flag
1572 warn_disallowed_functions.
1574 2008-07-08 Simon Martin <simartin@users.sourceforge.net>
1577 * decl.c (grokdeclarator): Reset storage_class and staticp for friend
1578 functions declared with a storage class qualifier.
1580 2008-07-03 Richard Guenther <rguenther@suse.de>
1583 * typeck.c (cp_build_function_call): Move code to verify
1584 builtin function arguments ...
1585 * call.c (build_cxx_call): ... here.
1587 2008-07-02 Jason Merrill <jason@redhat.com>
1589 * Make-lang.in (cp/typeck2.o): Add $(REAL_H) dependency.
1591 Implement WG21 N2672, Initializer List proposed wording
1592 * cp-tree.h (enum cp_tree_index): Add CPTI_INIT_LIST_TYPE.
1593 (struct lang_type_class): Add has_list_ctor bitfield.
1594 (TYPE_HAS_LIST_CTOR): New macro.
1595 (BRACE_ENCLOSED_INITIALIZER_P): Expect init_list_type_node.
1596 (CONSTRUCTOR_IS_DIRECT_INIT): New macro.
1597 (LOOKUP_NO_NARROWING): New macro.
1598 (LOOKUP_NO_COPY_CTOR_CONVERSION): New macro.
1599 * parser.c (cp_parse_braced_list): Split out from...
1600 (cp_parser_initializer_clause): ...here.
1601 (cp_parser_postfix_expression): Build up CONSTRUCTOR for compound
1603 (cp_lexer_next_token_is_not_keyword): New fn.
1604 (cp_parser_parenthesized_expression_list): Handle { }.
1605 (cp_parser_new_expression, cp_parser_new_initializer): Likewise.
1606 (cp_parser_assignment_expression, cp_parser_condition): Likewise.
1607 (cp_parser_jump_statement, cp_parser_simple_declaration): Likewise.
1608 (cp_parser_mem_initializer, cp_parser_init_declarator): Likewise.
1609 (cp_parser_initializer, cp_parser_functional_cast): Likewise.
1610 (cp_parser_omp_for_loop, cp_parser_cache_group): Likewise.
1611 (cp_parser_save_member_function_body): Likewise.
1612 * call.c (conversion_kind): Add ck_list, ck_aggr.
1613 (struct conversion): Add check_narrowing bitfield, conversion list.
1614 (build_list_conv): New fn.
1615 (build_aggr_conv): New fn.
1616 (implicit_conversion): Call them.
1617 (standard_conversion): Set check_narrowing if appropriate.
1618 (add_function_candidate): Handle LOOKUP_NO_COPY_CTOR_CONVERSION.
1619 (build_user_type_conversion_1): When converting from an init list,
1620 we allow additional conversions except when calling a copy ctor.
1621 (convert_like_real): Calling an explicit ctor for an init list is
1622 ill-formed. Handle ck_list and ck_addr. Check narrowing.
1623 (build_new_method_call): If CONSTRUCTOR_IS_DIRECT_INIT is set and
1624 class doesn't have a list ctor, break the {} into a TREE_LIST.
1625 (compare_ics): ck_list is better than other UDCs.
1626 (set_up_extended_ref_temp): Split out from initialize_reference.
1627 (is_std_init_list): New fn.
1628 (is_list_ctor): New fn.
1629 * decl.c (cxx_init_decl_processing): Create init_list_type_node.
1630 (reshape_init_array_1): Pass it to build_constructor.
1631 (reshape_init_class): Ditto.
1632 (initialize_artificial_var): Pass the appropriate type.
1633 (build_aggr_init_full_exprs): Split out from...
1634 (check_initializer): ...here. Handle new semantics.
1635 (build_init_list_var_init): New subroutine of check_initializer.
1636 (grokdeclarator): Converting constructors can have more than one parm.
1637 (grok_special_member_properties): Set TYPE_HAS_LIST_CTOR.
1638 * init.c (expand_default_init): Only do digest_init for aggregates.
1639 * rtti.c (tinfo_base_init): Pass init_list_type_node to
1640 build_constructor_from_list.
1641 (generic_initializer, ptr_initializer): Ditto.
1642 (ptm_initializer, class_initializer): Ditto.
1643 (get_pseudo_ti_init): Ditto.
1644 * error.c (dump_type): Handle init_list_type_node.
1645 (maybe_warn_cpp0x): New fn.
1646 (maybe_varn_variadic_templates): Call it.
1647 * cvt.c (ocp_convert): Handle conversion from { }.
1648 * tree.c (build_array_of_n_type): New fn.
1649 * typeck2.c (store_init_value): Use init_list_type_node.
1650 (digest_init): Likewise.
1651 (check_narrowing): New fn.
1652 * semantics.c: (finish_compound_literal): Take CONSTRUCTOR instead
1653 of vector of constructor elts. Handle non-aggregate types. Make
1654 constant literals static.
1655 * pt.c: (tsubst_copy_and_build): Adjust.
1656 (unify): Handle { }.
1657 * name-lookup.c (arg_assoc_type): Handle init_list_type_node.
1659 2008-07-01 Daniel Jacobowitz <dan@codesourcery.com>
1661 * typeck.c (comp_ptr_ttypes_real): Use vector_targets_convertible_p.
1662 (comp_ptr_ttypes_const): Likewise.
1664 2008-07-01 Andrew Haley <aph@redhat.com>
1666 * decl.c (finish_constructor_body): Don't set the return value of
1667 the constructor if the constructor is that of a Java type.
1669 2008-06-30 Jakub Jelinek <jakub@redhat.com>
1672 * decl2.c (is_late_template_attribute): If the first attribute
1673 argument is IDENTIFIER_NODE, don't consider it when checking
1674 if arguments are value or type dependent.
1676 2008-06-29 Paolo Carlini <paolo.carlini@oracle.com>
1679 * pt.c (do_type_instantiation): In c++0x mode do not warn for
1682 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1684 * Make-lang.in (cp-warn): Delete $(CXX_COMPAT_WARN).
1686 2008-06-28 Jakub Jelinek <jakub@redhat.com>
1689 * repo.c (repo_emit_p): Put const static data members initialized
1690 by const expr into *.rpo file, just return 2 if IDENTIFIER_REPO_CHOSEN
1693 2008-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1696 * pt.c (do_decl_instantiation): In c++0x mode do not warn for
1699 2008-06-24 Jonathan Wakely <jwakely.gcc@gmail.com>
1702 * typeck.c (cp_build_function_call): Show example syntax in
1705 2008-06-21 Jonathan Wakely <jwakely.gcc@gmail.com>
1707 * typeck.c (composite_pointer_type_r, cxx_sizeof_expr,
1708 cxx_alignof_expr, check_template_keyword, cp_build_binary_op,
1709 pointer_diff, cp_build_unary_op, build_x_compound_expr_from_list,
1710 build_reinterpret_cast_1, cp_build_c_cast, check_return_expr): Change
1711 pedwarn to permerror.
1712 * init.c (perform_member_init, build_new_1, build_new): Likewise.
1713 * decl.c (warn_extern_redeclared_static, duplicate_decls,
1714 * identify_goto, check_previous_goto_1, check_goto, define_label,
1715 check_tag_decl, start_decl, check_class_member_definition_namespace,
1716 grokfndecl, grokdeclarator): Likewise.
1717 * except.c (check_handlers): Likewise.
1718 * typeck2.c (digest_init): Likewise.
1719 * pt.c (check_specialization_namespace,
1720 check_explicit_instantiation_namespace,
1721 maybe_process_partial_specialization, check_explicit_specialization,
1722 convert_template_argument, do_decl_instantiation,
1723 do_type_instantiation, instantiate_decl): Likewise.
1724 * semantics.c (finish_template_type_parm): Likewise.
1725 * name-lookup.c (pushdecl_maybe_friend,
1726 check_for_out_of_scope_variable): Likewise.
1727 * decl2.c (finish_static_data_member_decl, build_anon_union_vars,
1728 coerce_new_type): Likewise.
1729 * parser.c (cp_parser_nested_name_specifier_opt,
1730 cp_parser_mem_initializer, cp_parser_elaborated_type_specifier,
1731 cp_parser_class_head, cp_parser_check_class_key): Likewise.
1732 (cp_parser_parameter_declaration): Check flag_permissive instead of
1733 flag_pedantic_errors.
1734 * call.c (joust): Change pedwarn to warning.
1735 * friend.c (make_friend_class): Likewise.
1737 2008-06-16 Jan Hubicka <jh@suse.cz>
1739 * method.c: Include cgraph.h.
1740 (use_thunk): Use cgraph_add_new_function instead of calling backend
1743 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1745 * parser.c: Fix comment typo.
1747 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1750 * decl2.c (grokbitfield): Receive the list of attributes, pass it to
1751 grokdeclarator and apply it to the created declaration.
1752 * cp-tree.h (grokbitfield): Update prototype.
1753 * parser.c (cp_parser_member_declaration): Don't apply the attributes
1754 since they are now applied in grokbitfield. Adjusted the call to
1756 (cp_parser_objc_class_ivars): Likewise.
1758 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1761 * class.c (type_requires_array_cookie): Do not consider delete[]
1762 operators with an ellipsis as second argument.
1764 2008-06-09 Jakub Jelinek <jakub@redhat.com>
1767 * semantics.c (stmt_expr_value_expr): Don't crash on empty
1770 2008-06-08 Paolo Carlini <paolo.carlini@oracle.com>
1773 * pt.c (maybe_process_partial_specialization): Check the tree
1774 returned by push_template_decl for error_mark_node.
1775 * parser.c (cp_parser_class_head): Likewise, check the tree
1776 returned by the latter.
1778 2008-06-07 Paolo Carlini <paolo.carlini@oracle.com>
1781 * decl.c (grokdeclarator): In case of wrong return type return
1782 immediately error_mark_node.
1784 2008-06-06 Jakub Jelinek <jakub@redhat.com>
1786 * cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
1787 dependent_omp_for_p, begin_omp_task, finish_omp_task,
1788 finish_omp_taskwait): New prototypes.
1789 (cxx_omp_clause_default_ctor): Add outer argument.
1790 (finish_omp_for): Add new clauses argument.
1791 * cp-gimplify.c (cxx_omp_finish_clause): New function.
1792 (cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten.
1793 (cxx_omp_clause_default_ctor): Add outer argument.
1794 (cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
1795 * cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
1796 * parser.c (cp_parser_omp_for_loop): Parse collapsed for loops.
1797 Add par_clauses argument. If decl is present in parallel's
1798 lastprivate clause, change that clause to shared and add
1799 a lastprivate clause for decl to OMP_FOR_CLAUSES.
1800 Fix wording of error messages. Adjust finish_omp_for caller.
1801 Add clauses argument. Parse loops with random access iterators.
1802 (cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New
1804 (cp_parser_omp_for, cp_parser_omp_parallel): Adjust
1805 cp_parser_omp_for_loop callers.
1806 (cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper
1808 (cp_parser_omp_clause_name): Handle collapse and untied
1810 (cp_parser_omp_clause_schedule): Handle auto schedule.
1811 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
1812 and PRAGMA_OMP_CLAUSE_UNTIED.
1813 (OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE.
1814 (OMP_TASK_CLAUSE_MASK): Define.
1815 (cp_parser_omp_task, cp_parser_omp_taskwait): New functions.
1816 (cp_parser_omp_construct): Handle PRAGMA_OMP_TASK.
1817 (cp_parser_pragma): Handle PRAGMA_OMP_TASK and
1818 PRAGMA_OMP_TASKWAIT.
1819 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
1820 OMP_CLAUSE_UNTIED. Handle OMP_CLAUSE_LASTPRIVATE_STMT.
1821 (tsubst_omp_for_iterator): New function.
1822 (dependent_omp_for_p): New function.
1823 (tsubst_expr) <case OMP_FOR>: Use it. Handle collapsed OMP_FOR
1824 loops. Adjust finish_omp_for caller. Handle loops with random
1825 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR} changes.
1826 (tsubst_expr): Handle OMP_TASK.
1827 * semantics.c (cxx_omp_create_clause_info): New function.
1828 (finish_omp_clauses): Call it. Handle OMP_CLAUSE_UNTIED and
1829 OMP_CLAUSE_COLLAPSE.
1830 (cxx_omp_predetermined_sharing): Removed.
1831 * semantics.c (finish_omp_for): Allow pointer iterators. Use
1832 handle_omp_for_class_iterator and dependent_omp_for_p. Handle
1833 collapsed for loops. Adjust c_finish_omp_for caller. Add new
1834 clauses argument. Fix check for type dependent cond or incr.
1835 Set OMP_FOR_CLAUSES to clauses. Use cp_convert instead of
1836 fold_convert to convert incr amount to difference_type. Only
1837 fold if not in template. If decl is mentioned in lastprivate
1838 clause, set OMP_CLAUSE_LASTPRIVATE_STMT. Handle loops with random
1839 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR}
1841 (finish_omp_threadprivate): Allow static class members of the
1843 (handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
1844 finish_omp_taskwait): New functions.
1846 * parser.c (cp_parser_binary_expression): Add prec argument.
1847 (cp_parser_assignment_expression): Adjust caller.
1848 * cp-tree.h (outer_curly_brace_block): New prototype.
1849 * decl.c (outer_curly_brace_block): No longer static.
1851 2008-06-02 Paolo Carlini <paolo.carlini@oracle.com>
1854 * pt.c (push_template_decl_real): Consistently return error_mark_node
1857 2008-06-02 Tomas Bily <tbily@suse.cz>
1859 * typeck.c (is_bitfield_expr_with_lowered_type): Use CASE_CONVERT.
1860 (cp_build_unary_op): Likewise.
1861 (cp_build_indirect_ref): Use CONVERT_EXPR_P.
1862 (maybe_warn_about_returning_address_of_local): Likewise.
1864 2008-05-29 Paolo Carlini <paolo.carlini@oracle.com>
1867 * pt.c (tsubst_initializer_list): Consistently check the tree
1868 returned by tsubst_pack_expansion for error_mark_node.
1870 2008-05-27 Michael Matz <matz@suse.de>
1873 * call.c (build_new_op): Make warning conditional on
1876 2008-05-27 Alexandre Oliva <aoliva@redhat.com>
1879 * call.c (convert_like_real): Convert bitfield to desired type
1880 before creating temporary.
1882 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
1884 * Makefile.in: Adjusted dependencies on c-incpath.o.
1886 2008-05-23 Jakub Jelinek <jakub@redhat.com>
1889 * cp-gimplify.c (cxx_omp_clause_apply_fn): Call
1890 fold_build_cleanup_point_expr on build_call_a results.
1893 * semantics.c (omp_clause_info_fndecl): New function.
1894 (finish_omp_clauses): Use it.
1896 2008-05-21 Jakub Jelinek <jakub@redhat.com>
1899 * cp-tree.h (check_array_initializer): New prototype.
1900 * decl.c (check_array_initializer): New function.
1901 (check_initializer): Call it.
1902 * semantics.c (finish_compound_literal): Call it for ARRAY_TYPEs.
1904 2008-05-21 Tom Tromey <tromey@redhat.com>
1906 * mangle.c (save_partially_mangled_name): Remove.
1907 (restore_partially_mangled_name): Likewise.
1908 (write_encoding): Update.
1909 (write_unqualified_name): Likewise.
1910 (start_mangling): Always use name_obstack. Remove 'ident_p'
1912 (get_identifier_nocopy): Remove.
1913 (finish_mangling_internal): Rename from finish_mangling.
1914 (finish_mangling): New function.
1915 (finish_mangling_get_identifier): Likewise.
1916 (partially_mangled_name, partially_mangled_name_len): Remove.
1917 (mangle_decl_string): Change return type. Update.
1918 (mangle_decl, mangle_type_string, mangle_special_for_type,
1919 mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable,
1920 mangle_ref_init_variable): Update.
1922 2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
1925 * semantics.c (begin_class_definition): Extend checks on the first
1928 2008-05-12 Tomas Bily <tbily@suse.cz>
1930 * typeck2.c (digest_init): Use CONVERT_EXPR_P.
1931 * call.c (build_over_call): Likewise.
1932 * error.c (dump_expr): Use CASE_CONVERT.
1933 * class.c (fixed_type_or_null): Likewise.
1935 2008-05-11 Volker Reichelt <v.reichelt@netcologne.de>
1937 * parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
1939 (cp_parser_omp_clause_schedule): Remove superfluous "expected"
1942 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
1944 * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
1945 DECL_LOOPING_CONST_OR_PURE_P attributes.
1946 * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
1949 2008-05-02 Simon Baldwin <simonb@google.com>
1952 * typeck.c (build_array_ref): Remove warn_array_subscript_range.
1954 2008-05-01 Simon Baldwin <simonb@google.com>
1956 * typeck.c (build_array_ref): Call warn_array_subscript_range.
1958 2008-04-30 Jakub Jelinek <jakub@redhat.com>
1961 * pt.c (more_specialized_fn): Stop the loop even if there are no
1962 arguments before ellipsis.
1964 2008-04-29 Jakub Jelinek <jakub@redhat.com>
1967 * parser.c (cp_parser_lookup_name): Look through single function
1971 * typeck.c (cp_build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
1972 COMPOUND_EXPR if the second argument would be error_mark_node.
1974 2008-04-28 Jason Merrill <jason@redhat.com>
1975 Liu Guanwei <liu_gw@163.com>
1978 * parser.c (cp_parser_parameter_declaration): Handle < ambiguity
1979 in default arguments.
1981 2008-04-25 Jan Hubicka <jh@suse.cz>
1983 * typeck.c (check_return_expr): Update.
1984 * decl.c (start_preparsed_function): Update.
1985 * method.c (use_thunk): Update.
1987 2008-04-24 Jakub Jelinek <jakub@redhat.com>
1990 * cp-tree.h (cp_reconstruct_complex_type): New prototype.
1991 * cp-objcp-common.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
1992 * decl2.c (is_late_template_attribute): Only make vector_size
1993 late tmpl attribute if argument is type or value dependent.
1994 (cp_reconstruct_complex_type): New function.
1996 2008-04-24 Richard Guenther <rguenther@suse.de>
1998 * typeck.c (cp_build_function_call): Call
1999 check_builtin_function_arguments.
2001 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
2003 * typeck.c (get_member_function_from_ptrfunc): Don't set TREE_INVARIANT.
2004 (build_ptrmemfunc1): Don't set TREE_INVARIANT.
2005 * init.c (build_zero_init): Don't set TREE_INVARIANT.
2006 * class.c (build_base_path): Don't set TREE_INVARIANT.
2007 (build_vtbl_ref_1): Don't set TREE_INVARIANT.
2008 (build_vtbl_initializer): Don't set TREE_INVARIANT.
2009 * decl.c (build_enumerator): Don't set TREE_INVARIANT.
2010 * rtti.c (tinfo_base_init): Don't set TREE_INVARIANT.
2011 (generic_initializer): Don't set TREE_INVARIANT.
2012 (ptr_initializer): Don't set TREE_INVARIANT.
2013 (ptm_initializer): Don't set TREE_INVARIANT.
2014 (class_initializer): Don't set TREE_INVARIANT.
2015 * typeck2.c (process_init_constructor): Don't set TREE_INVARIANT.
2016 * pt.c (push_inline_template_parms_recursive): Don't set TREE_INVARIANT.
2017 (build_template_parm_index): Don't set TREE_INVARIANT.
2018 (reduce_template_parm_level): Don't set TREE_INVARIANT.
2019 (process_template_parm): Don't set TREE_INVARIANT.
2021 2008-04-22 Jason Merrill <jason@redhat.com>
2024 * semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
2025 to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
2026 * typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
2028 2008-04-22 Jakub Jelinek <jakub@redhat.com>
2031 * semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
2032 expression is errorneous.
2034 2008-04-21 Jason Merrill <jason@redhat.com>
2037 * tree.c (cp_tree_equal): Handle FIXED_CST.
2040 * pt.c (template_template_parm_bindings_ok_p): Set
2041 processing_template_decl while in this function.
2043 2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
2045 * cvt.c (type_promotes_to): Support char16_t and char32_t.
2046 * decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
2047 char16_t and char32_t.
2048 * lex.c (reswords): Add char16_t and char32_t (for c++0x).
2049 * mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
2050 extended builtin type "u8char{16,32}_t".
2051 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
2053 (cp_lexer_print_token): Support CPP_STRING{16,32}.
2054 (cp_parser_is_string_literal): Idem.
2055 (cp_parser_string_literal): Idem.
2056 (cp_parser_primary_expression): Support CPP_CHAR{16,32} and
2058 (cp_parser_simple_type_specifier): Support RID_CHAR{16,32}.
2059 * tree.c (char_type_p): Support char16_t and char32_t as char types.
2060 * typeck.c (string_conv_p): Support char16_t and char32_t.
2062 2008-04-17 Jason Merrill <jason@redhat.com>
2065 * call.c (build_user_type_conversion_1): Represent second step of
2066 copy-init with an rvalue conversion.
2067 (convert_like_real) [ck_user]: Don't implicitly add it here.
2069 2008-04-15 Jakub Jelinek <jakub@redhat.com>
2072 * decl.c (layout_var_decl): If extern or static var has variable
2073 size, set TREE_TYPE (decl) to error_mark_node.
2075 2008-04-16 Danny Smith <dannysmith@users.sourceforge.net>
2078 * optimize.c (maybe_clone_body): Copy DECL_DLLIMPORT_P flag
2081 2008-04-09 Jason Merrill <jason@redhat.com>
2084 * semantics.c (finish_compound_literal): Return a TARGET_EXPR,
2085 not a pushed variable.
2087 2008-04-09 Volker Reichelt <v.reichelt@netcologne.de>
2089 * call.c (build_op_delete_call): Fix quotation in warning message.
2090 * decl.c (grokdeclarator): Quote keyword in error message.
2091 * pt.c (check_for_bare_parameter_packs): Fix quotation in error
2094 * parser.c (cp_parser_check_type_definition): Print error string
2095 directly rather than using "%s".
2096 (cp_parser_postfix_expression): Fix quotation.
2097 (cp_parser_decltype): Likewise.
2098 (cp_parser_sizeof_operand): Fix quotation. Simplify.
2100 * parser.c (cp_parser_non_integral_constant_expression): Build error
2101 message with CONCAT rather than using "%s".
2102 (cp_parser_primary_expression): Fix quotation.
2103 (cp_parser_postfix_expression): Likewise.
2104 (cp_parser_postfix_dot_deref_expression): Likewise.
2105 (cp_parser_unary_expression): Likewise.
2106 (cp_parser_new_expression): Likewise.
2107 (cp_parser_delete_expression): Likewise.
2109 * parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
2110 as `)', not as `('. Fix quotation.
2111 (cp_parser_consume_semicolon_at_end_of_statement): Fix quotation.
2112 (cp_parser_primary_expression): Likewise.
2113 (cp_parser_nested_name_specifier_opt): Likewise.
2114 (cp_parser_postfix_expression): Likewise.
2115 (cp_parser_postfix_open_square_expression): Likewise.
2116 (cp_parser_parenthesized_expression_list): Likewise.
2117 (cp_parser_pseudo_destructor_name): Likewise.
2118 (cp_parser_new_expression): Likewise.
2119 (cp_parser_direct_new_declarator): Likewise.
2120 (cp_parser_delete_expression): Likewise.
2121 (cp_parser_cast_expression): Likewise.
2122 (cp_parser_question_colon_clause): Likewise.
2123 (cp_parser_builtin_offsetof): Likewise.
2124 (cp_parser_trait_expr): Likewise.
2125 (cp_parser_label_for_labeled_statement): Likewise.
2126 (cp_parser_compound_statement): Likewise.
2127 (cp_parser_selection_statement): Likewise.
2128 (cp_parser_condition): Likewise.
2129 (cp_parser_iteration_statement): Likewise.
2130 (cp_parser_already_scoped_statement): Likewise.
2131 (cp_parser_simple_declaration): Likewise.
2132 (cp_parser_linkage_specification): Likewise.
2133 (cp_parser_static_assert): Likewise.
2134 (cp_parser_decltype): Likewise.
2135 (cp_parser_conversion_function_id): Likewise.
2136 (cp_parser_operator_function_id): Likewise.
2137 (cp_parser_operator): Likewise.
2138 (cp_parser_type_parameter): Likewise.
2139 (cp_parser_template_id): Likewise.
2140 (cp_parser_explicit_instantiation): Likewise.
2141 (cp_parser_explicit_specialization): Likewise.
2142 (cp_parser_enum_specifier): Likewise.
2143 (cp_parser_namespace_definition): Likewise.
2144 (cp_parser_namespace_alias_definition): Likewise.
2145 (cp_parser_using_declaration): Likewise.
2146 (cp_parser_using_directive): Likewise.
2147 (cp_parser_asm_definition): Likewise.
2148 (cp_parser_direct_declarator): Likewise.
2149 (cp_parser_ptr_operator): Likewise.
2150 (cp_parser_parameter_declaration_clause): Likewise.
2151 (cp_parser_initializer_clause): Likewise.
2152 (cp_parser_class_specifier): Likewise.
2153 (cp_parser_member_specification_opt): Likewise.
2154 (cp_parser_member_declaration): Likewise.
2155 (cp_parser_pure_specifier): Likewise.
2156 (cp_parser_constant_initializer): Likewise.
2157 (cp_parser_base_clause): Likewise.
2158 (cp_parser_exception_specification_opt): Likewise.
2159 (cp_parser_try_block): Likewise.
2160 (cp_parser_function_try_block): Likewise.
2161 (cp_parser_handler): Likewise.
2162 (cp_parser_throw_expression): Likewise.
2163 (cp_parser_asm_operand_list): Likewise.
2164 (cp_parser_attributes_opt): Likewise.
2165 (cp_parser_label_declaration): Likewise.
2166 (cp_parser_constructor_declarator_p): Likewise.
2167 (cp_parser_template_declaration_after_export): Likewise.
2168 (cp_parser_single_declaration): Likewise.
2169 (cp_parser_objc_message_expression): Likewise.
2170 (cp_parser_objc_message_args): Likewise.
2171 (cp_parser_objc_encode_expression): Likewise.
2172 (cp_parser_objc_defs_expression): Likewise.
2173 (cp_parser_objc_protocol_expression): Likewise.
2174 (cp_parser_objc_selector_expression): Likewise.
2175 (cp_parser_objc_protocol_refs_opt): Likewise.
2176 (cp_parser_objc_typename): Likewise.
2177 (cp_parser_objc_method_keyword_params): Likewise.
2178 (cp_parser_objc_superclass_or_category): Likewise.
2179 (cp_parser_objc_try_catch_finally_statement): Likewise.
2180 (cp_parser_objc_synchronized_statement): Likewise.
2181 (cp_parser_objc_throw_statement): Likewise.
2182 (cp_parser_omp_var_list_no_open): Likewise.
2183 (cp_parser_omp_clause_default): Likewise.
2184 (cp_parser_omp_clause_if): Likewise.
2185 (cp_parser_omp_clause_num_threads): Likewise.
2186 (cp_parser_omp_clause_reduction): Likewise.
2187 (cp_parser_omp_clause_schedule): Likewise.
2188 (cp_parser_omp_critical): Likewise.
2189 (cp_parser_omp_for_loop): Likewise.
2190 (cp_parser_omp_sections_scope): Likewise.
2192 * parser.c (cp_parser_template_parameter_list): Simplify.
2194 2008-04-07 James E. Wilson <wilson@tuliptree.org>
2196 * pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
2198 2008-04-07 Jason Merrill <jason@redhat.com>
2201 * class.c (type_has_user_nondefault_constructor): A template
2202 counts as a nondefault constructor.
2204 2008-04-04 Paolo Bonzini <bonzini@gnu.org>
2206 * decl.c (cxx_push_function_context): Delete.
2207 (cxx_pop_function_context): Delete.
2208 (start_preparsed_function): Merge cxx_push_function_context (!f->decl
2210 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_INIT,
2211 LANG_HOOKS_FUNCTION_FINAL): Delete.
2212 (LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P): Rename to
2213 LANG_HOOKS_MISSING_NORETURN_OK_P.
2214 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context):
2216 * semantics.c (current_stmt_tree): Fix comment.
2218 2008-04-03 Jakub Jelinek <jakub@redhat.com>
2221 * semantics.c (finish_offsetof): Undo effect of convert_from_reference
2222 before calling fold_offsetof.
2224 2008-04-03 Tom Tromey <tromey@redhat.com>
2226 * Make-lang.in (c++_OBJS): New variable.
2228 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
2230 * optimize.c (clone_body): New, from tree-inline.c.
2232 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
2234 * method.c (synthesize_method): Use {push,pop}_function_context.
2235 * name-lookup.c (push_to_top_level): Likewise.
2236 * parser.c (cp_parser_late_parsing_for_member): Likewise.
2238 2008-03-30 Volker Reichelt <v.reichelt@netcologne.de>
2241 * parser.c (cp_parser_decl_specifier_seq): Add location to error
2244 2008-03-27 Tom Tromey <tromey@redhat.com>
2246 * Make-lang.in: Revert automatic dependency patch.
2248 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
2251 * typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
2252 (build_compound_expr): New, for compatibility with C
2253 build_compound_expr.
2254 (cp_build_compound_expr): Renamed from build_compound_expr.
2255 (build_c_cast): New, for compatibility with C build_c_cast.
2256 (cp_build_c_cast): Renamed from build_c_cast.
2257 * init.c (build_vec_delete_1): Fix calls to build_compound_expr.
2258 * decl.c (cxx_maybe_build_cleanup): Ditto.
2259 * cp-tree.h (build_compound_expr): Add C-compatibile prototype.
2260 (cp_build_compound_expr): Renamed from build_compound_expr.
2261 (build_c_cast): Add C-compatible prototype.
2262 (cp_build_c_cast): Renamed from build_c_cast.
2263 * typeck2.c (build_functional_cast): Use cp_build_c_cast.
2264 * parser.c (cp_parser_cast_expression): Fix call to build_c_cast.
2266 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
2268 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Cope with
2269 tsubst_pack_expansion returning a pack expansion, or a TREE_VEC
2270 ending in a pack expansion, both of which can occur when
2271 substituting into a nested template.
2272 (tsubst_copy_and_build) <case SIZEOF_EXPR>: When we're
2273 instantiating the sizeof...(X) form, make tsubst_copy do the work.
2274 * parser.c (cp_parser_template_parameter): Deal with unnamed
2275 non-type template parameter packs identified by pack expansions in
2278 2008-03-26 Jakub Jelinek <jakub@redhat.com>
2281 * pt.c (apply_late_template_attributes): Don't call tsubst on
2282 first attribute argument if it is IDENTIFIER_NODE.
2285 * error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
2286 and LTGT_EXPR to pp_expression.
2288 2008-03-26 Douglas Gregor <doug.gregor@gmail.com>
2290 * pt.c (coerce_template_template_parm): Moved the body of the loop
2291 of coerce_template_template_parms here, to make iteration over a
2292 template argument pack simpler.
2293 Also, allow matching of a template parameter pack in the template
2294 template parameter to a template parameter in the template
2296 (coerce_template_template_parms): Deal with variadic template
2297 template parameters. Use coerce_template_template_parm.
2298 (unify): Make sure we coerce the template template argument's
2299 template arguments to the template template parameter's template
2300 parameters, not the other way around.
2302 2008-03-25 Tom Tromey <tromey@redhat.com>
2304 * Make-lang.in: Remove .o targets.
2305 (cp/g++spec.o): Moved to cp/. Reduce to variable setting.
2307 (c++_OBJS): New variable.
2308 (CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
2310 2008-03-25 Douglas Gregor <doug.gregor@gmail.com>
2312 * typeck.c (composite_pointer_type_r): Add SFINAE support.
2313 (composite_pointer_type): Ditto.
2314 (common_type): Fix call to composite_pointer_type.
2315 (cxx_sizeof_nowarn): New; used to be a macro.
2316 (cxx_sizeof_expr): Add SFINAE support.
2317 (cxx_alignof_expr): Ditto.
2318 (decay_conversion): Fix calls for SFINAE support.
2319 (rationalize_conditional_expr): Add SFINAE support.
2320 (build_class_member_access_expr): Ditto.
2321 (finish_class_member_access_expr): Ditto.
2322 (build_x_indirect_ref): Ditto.
2323 (build_indirect_ref): Original version renamed to
2324 cp_build_indirect_ref; new version provides a bridge from
2326 (cp_build_indirect_ref): Was build_indirect_ref; added SFINAE
2328 (get_member_function_from_ptrfunc): Fix calls for SFINAE support.
2329 (build_function_call): Original version renamed to
2330 cp_build_function_call; new version provides a bridge from
2332 (cp_build_function_call): Was build_function_call; added SFINAE
2334 (convert_arguments): Add SFINAE support.
2335 (build_x_binary_op): Ditto.
2336 (build_binary_op): Original version renamed to cp_build_binary_op;
2337 new version provides a bridge from c-common.
2338 (cp_build_binary_op): Was build_binary_op; added SFINAE support.
2339 (pointer_diff): Fix calls for SFINAE.
2340 (build_x_unary_op): Add SFINAE support.
2341 (condition_conversion): Fix calls for SFINAE.
2342 (build_unary_op): Original version renamed to cp_build_unary_op;
2343 new version provides a bridge from c-common.
2344 (cp_build_unary_op): Was build_unary_op; added SFINAE support.
2345 (unary_complex_lvalue): Fix calls for SFINAE.
2346 (build_x_conditional_expr): Add SFINAE support.
2347 (build_x_compound_expr_from_list): Fix calls for SFINAE.
2348 (build_x_compound_expr): Add SFINAE support.
2349 (convert_ptrmem): Fix calls for SFINAE.
2350 (build_static_cast_1): Add SFINAE support.
2351 (build_static_cast): Ditto.
2352 (build_reinterpret_cast_1): Ditto.
2353 (build_reinterpret_cast): Ditto.
2354 (build_const_cast_1): Ditto.
2355 (build_const_cast): Ditto.
2356 (build_c_cast): Ditto.
2357 (build_modify_expr): Original version renamed to
2358 cp_build_modify_expr; new version provides a bridge from c-common.
2359 (cp_build_modify_expr): Was build_modify_expr; added SFINAE
2361 (build_x_modify_expr): Add SFINAE support.
2362 (build_ptrmemfunc): Fix calls for SFINAE.
2363 (convert_for_assignment): Add SFINAE support.
2364 (convert_for_initialization): Ditto.
2365 (check_return_expr): Fix calls for SFINAE.
2366 (lvalue_or_else): Add SFINAE support.
2367 * init.c (perform_member_init): Fix calls for SFINAE.
2368 (emit_mem_initializers): Ditto.
2369 (expand_virtual_init): Ditto.
2370 (expand_cleanup_for_base): Ditto.
2371 (build_aggr_init): Add SFINAE support.
2372 (expand_default_init): Ditto.
2373 (expand_aggr_init_1): Fix calls for SFINAE.
2374 (build_offset_ref): Ditto.
2375 (build_new_1): Add SFINAE support.
2377 (build_vec_delete_1): Fix calls for SFINAE.
2378 (get_temp_regvar): Ditto.
2379 (build_vec_init): Add SFINAE support.
2380 (build_dtor_call): Fix calls for SFINAE.
2381 (build_delete): Ditto.
2382 (push_base_cleanups): Ditto.
2383 (build_vec_delete_1): Ditto.
2384 * class.c (build_base_path): Fix calls for SFINAE.
2385 (build_simple_base_path): Ditto.
2386 (convert_to_base_statically): Ditto.
2387 (build_vfn_ref): Ditto.
2388 (resolve_address_of_overloaded_function): Ditto.
2389 * decl.c (check_initializer): Fix calls for SFINAE.
2390 (register_dtor_fn): Ditto.
2391 (compute_array_index_type): Ditto.
2392 (finish_enum): Ditto.
2393 (start_preparsed_function): Ditto.
2394 (cxx_maybe_build_cleanup): Ditto.
2395 * call.c (convert_like): Add COMPLAIN argument.
2396 (convert_like_with_context): Ditto.
2397 (build_this): Fix calls for SFINAE.
2398 (build_user_type_conversion): Ditto.
2399 (resolve_args): Ditto.
2400 (build_new_function_call): Add SFINAE support.
2401 (build_operator_new_call): Fix calls for SFINAE.
2402 (build_object_call): Add SFINAE support.
2403 (build_conditional_expr): Ditto.
2404 (build_new_op): Ditto.
2405 (build_op_delete_call): Fix calls for SFINAE.
2406 (build_temp): Ditto.
2407 (convert_like_real): Add SFINAE support.
2408 (build_x_va_arg): Fix calls for SFINAE.
2409 (convert_default_arg): Ditto.
2410 (build_over_call): Add SFINAE support.
2411 (build_java_interface_fn_ref): Fix calls for SFINAE.
2412 (build_special_member_call): Add SFINAE support.
2413 (build_new_method_call): Ditto.
2414 (perform_implicit_conversion): Ditto.
2415 (perform_direct_initialization_if_possible): Ditto.
2416 (initialize_reference): Fix calls for SFINAE.
2417 * method.c (do_build_assign_ref): Fix calls for SFINAE.
2418 * rtti.c (build_headof): Fix calls for SFINAE.
2419 (get_tinfo_decl_dynamic): Ditto.
2420 (get_typeid): Ditto.
2421 (build_dynamic_cast_1): Add SFINAE support.
2422 (build_dynamic_cast): Ditto.
2423 (tinfo_base_init): Fix calls for SFINAE.
2424 * except.c (do_get_exception_ptr): Fix calls for SFINAE.
2425 (do_end_catch): Ditto.
2426 (initialize_handler_parm): Ditto.
2427 (expand_start_catch_block): Ditto.
2428 (do_allocate_exception): Ditto.
2429 (do_free_exception): Ditto.
2430 (build_throw): Ditto.
2431 * cvt.c (build_up_reference): Fix calls for SFINAE.
2432 (convert_to_reference): Ditto.
2433 (ocp_convert): Ditto.
2434 (convert_to_void): Add SFINAE support.
2435 * tree.c (build_dummy_object): Fix calls for SFINAE.
2436 (stabilize_expr): Ditto.
2437 * cp-tree.h (build_conditional_expr): Add tsubst_flags_t
2439 (build_new_method_call): Ditto.
2440 (build_special_member_call): Ditto.
2441 (build_new_op): Ditto.
2442 (perform_implicit_conversion): Ditto.
2443 (perform_direct_initialization_if_possible): Ditto.
2444 (convert_to_void): Ditto.
2445 (build_aggr_init): Ditto.
2447 (build_vec_init): Ditto.
2448 (build_dynamic_cast): Ditto.
2449 (finish_call_expr): Ditto
2450 (cxx_sizeof_or_alignof_expr): Add COMPLAIN parameter.
2451 (cxx_sizeof_nowarn): Remove macro; add function declaration.
2452 (build_class_member_access_expr): Add tsubst_flags_t parameter.
2453 (finish_class_member_access_expr): Ditto.
2454 (build_x_indirect_ref): Ditto.
2455 (cp_build_indirect_ref): New.
2456 (cp_build_function_call): Add tsubst_flags_t parameter.
2457 (build_x_unary_op): Ditto.
2458 (cp_build_unary_op): New.
2459 (build_x_conditional_expr): Add tsubst_flags_t parameter.
2460 (build_x_compound_expr): Ditto.
2461 (build_compound_expr): Ditto.
2462 (build_static_cast): Ditto.
2463 (build_reinterpret_cast): Ditto.
2464 (build_const_cast): Ditto.
2465 (build_c_cast): Ditto.
2466 (build_x_modify_expr): Ditto.
2467 (cp_build_modify_expr): New.
2468 (convert_for_initialization): Add tsubst_flags_t parameter.
2469 (cp_build_binary_op): Remove macro; add function declaration.
2470 (invalid_nonstatic_memfn_p): Add tsubst_flags_t parameter.
2471 (lvalue_or_else): Ditto.
2472 (build_functional_cast): Ditto.
2473 * typeck2.c (digest_init): Fix calls for SFINAE.
2474 (process_init_constructor_array): Ditto.
2475 (process_init_constructor_record): Ditto.
2476 (build_x_arrow): Ditto.
2477 (build_m_component_ref): Ditto.
2478 (build_functional_cast): Add SFINAE support.
2479 * pt.c (tsubst_copy_and_build): Add (more) SFINAE support.
2480 * semantics.c (simplify_loop_decl_cond): Fix calls for SFINAE.
2481 (finish_expr_stmt): Ditto.
2482 (finish_for_expr): Ditto.
2483 (finish_asm_stmt): Ditto.
2484 (finish_non_static_data_member): Ditto.
2485 (finish_qualified_id_expr): Ditto.
2486 (finish_call_expr): Add SFINAE support.
2487 (finish_increment_expr): Fix calls for SFINAE.
2488 (finish_unary_op_expr): Ditto.
2489 (simplify_aggr_init_expr): Ditto.
2490 (finish_omp_clauses): Ditto.
2491 (finish_omp_for): Ditto.
2492 (finish_omp_barrier): Ditto.
2493 (finish_omo_flush): Ditto.
2494 * decl2.c (grok_array_decl): Fix calls or SFINAE.
2495 (build_anon_union_vars): Ditto.
2496 (get_guard_cond): Ditto.
2498 (one_static_initialization_or_destruction): Ditto.
2499 (do_static_initialization_or_destruction): Ditto.
2500 (generate_ctor_or_dtor_function): Ditto.
2501 (build_offset_ref_call_from_tree): Ditto.
2502 * parser.c (cp_parser_postfix_expression): Fix calls for SFINAE.
2503 (cp_parser_postfix_dot_deref_expression): Ditto.
2504 (cp_parser_unary_expression): Ditto.
2505 (cp_parser_new_expression): Ditto.
2506 (cp_parser_cast_expression): Ditto.
2507 (cp_parser_binary_expression): Ditto.
2508 (cp_parser_question_colon_clause): Ditto.
2509 (cp_parser_assignment_expression): Ditto.
2510 (cp_parser_expression): Ditto.
2511 (cp_parser_builtin_offsetof): Ditto.
2512 (cp_parser_template_argument): Ditto.
2513 (cp_parser_functional_cast): Ditto.
2515 2008-03-24 Tom Tromey <tromey@redhat.com>
2517 * lex.c (handle_pragma_interface): Don't copy the filename.
2518 (handle_pragma_implementation): Copy filename using xstrdup.
2520 2008-03-21 Paolo Carlini <pcarlini@suse.de>
2522 * cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P.
2523 (SET_IS_AGGR_TYPE): Rename to SET_CLASS_TYPE_P.
2524 (IS_AGGR_TYPE_CODE): Rename to RECORD_OR_UNION_CODE_P.
2525 (PROMOTES_TO_AGGR_TYPE): Remove.
2526 (CLASS_TYPE_P, TYPE_NON_AGGREGATE_CLASS): Adjust.
2527 * typeck.c (unary_complex_lvalue, build_modify_expr,
2528 convert_for_initialization): Adjust.
2529 * init.c (is_aggr_type): Remove.
2530 (is_class_type): Add.
2531 (build_offset_ref, build_new_1, build_vec_delete_1, build_vec_init,
2532 build_delete): Adjust.
2533 * lex.c (make_aggr_type): Remove.
2534 (make_class_type): Add.
2535 (cxx_make_type): Adjust.
2536 * class.c (finish_struct_1, fixed_type_or_null, is_empty_class):
2538 * decl.c (build_typename_type, make_typename_type,
2539 make_unbound_class_template, cxx_init_decl_processing,
2540 check_tag_decl, groktypename, start_decl_1, layout_var_decl,
2541 check_initializer, cp_finish_decl, build_ptrmemfunc_type, grokparms,
2542 grok_op_properties, xref_tag, check_function_type): Adjust.
2543 * call.c (check_dtor_name, standard_conversion, implicit_conversion,
2544 add_builtin_candidate, add_builtin_candidates,
2545 build_user_type_conversion_1, convert_like_real, build_cxx_call,
2546 is_subseq, compare_ics): Adjust.
2547 * method.c (use_thunk): Adjust.
2548 * rtti.c (build_dynamic_cast_1, create_pseudo_type_info,
2549 create_tinfo_types): Adjust.
2550 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
2551 build_up_reference, convert_to_reference, convert_from_reference,
2552 ocp_convert, build_expr_type_conversion): Adjust.
2553 * tree.c (bind_template_template_parm, error_type): Adjust.
2554 * dump.c (cp_dump_tree): Adjust.
2555 * search.c (lookup_member): Adjust.
2556 * friend.c (make_friend_class, do_friend): Adjust.
2557 * typeck2.c (store_init_value, process_init_constructor_array,
2558 process_init_constructor_record, build_x_arrow, build_m_component_ref,
2559 build_functional_cast): Adjust.
2560 * pt.c (finish_member_template_decl, process_template_parm,
2561 lookup_template_class, tsubst_function_type, tsubst,
2562 tsubst_copy_and_build, get_template_base, bt_instantiate_type_proc):
2564 * semantics.c (begin_class_definition, finish_base_specifier,
2565 finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
2567 * name-lookup.c (constructor_name_p, push_overloaded_decl,
2568 do_class_using_decl, lookup_qualified_name,
2569 maybe_process_template_type_declaration): Adjust.
2570 * decl2.c (grok_array_decl, check_member_template,
2571 constrain_class_visibility): Adjust.
2572 * parser.c (cp_parser_class_name): Adjust.
2574 2008-03-18 Paolo Bonzini <bonzini@gnu.org>
2576 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
2578 2008-03-17 Jason Merrill <jason@redhat.com>
2581 * call.c (reference_binding): Check LOOKUP_NO_TEMP_BIND when binding
2582 a temp directly to a reference as per DR391.
2584 2008-03-12 Richard Guenther <rguenther@suse.de>
2588 2008-02-04 Richard Guenther <rguenther@suse.de>
2591 * decl.c (record_builtin_java_type): Make jboolean a
2592 integer type again where its mode doesn't match that of bool.
2594 2008-01-25 Richard Guenther <rguenther@suse.de>
2597 * decl.c (record_builtin_java_type): Make __java_boolean
2599 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
2600 after TYPE_MAIN_VARIANT check.
2602 2008-03-10 Jakub Jelinek <jakub@redhat.com>
2605 * semantics.c (finish_omp_clauses): Look through NOP_EXPR even
2609 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
2610 DECL_P in not a variable and appears more than once error messages.
2612 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
2616 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
2620 * typeck.c (structural_comptypes): Call cp_comptypes.
2621 (comptypes): New; called from the C/C++ common bits to perform
2623 (cp_comptypes): Renamed from comptypes, which is already used,
2624 with a different signature, by the C++ front end.
2625 (build_reinterpret_cast_1): Call cp_comptypes.
2626 (ptr_reasonably_similar): Ditto.
2627 * decl.c (decls_match): Ditto.
2628 * cvt.c (convert_to_reference): Ditto.
2629 * cp-tree.h (same_type_p): Ditto.
2630 (same_or_base_type_p): Ditto.
2631 (comptypes): Rename to cp_comptypes.
2632 * pt.c (canonical_type_parameter): Call cp_comptypes.
2634 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
2636 * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
2637 test for equivalence between pointer and references.
2639 2008-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2642 * class.c (finish_struct_anon): Use permerror instead of pedwarn.
2643 (check_field_decls): Likewise.
2644 (note_name_declared_in_class): Likewise.
2645 * call.c (build_new_op): Likewise.
2646 (convert_like_real): Likewise.
2647 (build_over_call): Likewise.
2648 * lex.c (unqualified_fn_lookup_error): Likewise.
2649 * parser.c (cp_parser_template_id): Likewise.
2650 * cvt.c (warn_ref_binding): Likewise.
2651 (convert_to_reference): Likewise.
2652 (ocp_convert): Likewise.
2653 (convert_to_void): Use error instead of pedwarn.
2654 * error.c (cp_cpp_error): Use pedantic_warning_kind.
2655 * decl.c (compute_array_index_type): Use constant_expression_error.
2657 2008-03-01 Douglas Gregor <doug.gregor@gmail.com>
2659 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Note
2660 that auto is either a storage class or a simple type specifier,
2661 depending on the dialect.
2662 (cp_parser_decl_specifier_seq): Complain about `auto' as a storage
2663 specifier in C++98 mode, error in C++0x mode (since we don't
2664 support auto as a type specifier, yet).
2665 (cp_parser_storage_class_specifier_opt): Don't treat `auto' as a
2666 storage specifier in C++0x mode.
2667 (cp_parser_simple_type_specifier): Parse `auto' as a
2668 simple-type-specifier, but error because we don't support it yet.
2670 2008-02-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2672 * parser.c (cp_parser_nonclass_name): New.
2673 (cp_parser_pseudo_destructor_name): Use it instead of
2674 cp_parser_type_name.
2675 (cp_parser_type_name): Move code to cp_parser_nonclass_name.
2677 2008-02-29 Tom Tromey <tromey@redhat.com>
2679 * parser.c (struct cp_token) <input_file_stack_index>: Remove.
2680 (cp_lexer_get_preprocessor_token): Update.
2681 (cp_lexer_set_source_position_from_token): Don't call
2682 restore_input_file_stack.
2683 * lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
2685 2008-02-28 Richard Guenther <rguenther@suse.de>
2688 2008-02-26 Richard Guenther <rguenther@suse.de>
2690 * decl.c (duplicate_decls): Remove decl from global mapping
2691 before ggc_freeing it.
2693 2008-02-27 Jakub Jelinek <jakub@redhat.com>
2696 * rtti.c: Include c-pragma.h.
2697 (push_abi_namespace, pop_abi_namespace): New functions.
2698 (build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
2699 create_tinfo_types, emit_support_tinfos): Use them.
2700 * Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
2702 2008-02-26 Jason Merrill <jason@redhat.com>
2705 * decl.c (grokdeclarator): Allow a typedef of an unnamed struct
2706 to name the struct for linkage purposes even if it has attributes.
2707 (start_decl): In that case, set ATTR_FLAG_TYPE_IN_PLACE.
2709 2008-02-26 Tom Tromey <tromey@redhat.com>
2711 * parser.c (eof_token): Remove old location code.
2712 (check_empty_body): Remove test of USE_MAPPED_LOCATION.
2713 * decl2.c (generate_ctor_or_dtor_function): Remove old location
2715 (cp_write_global_declarations): Likewise.
2716 * lex.c (cxx_init): Remove old location code.
2717 (handle_pragma_implementation): Remove test of
2718 USE_MAPPED_LOCATION.
2719 * pt.c (tsubst): Remove old location code.
2720 * error.c (cp_print_error_function): Remove test of
2721 USE_MAPPED_LOCATION.
2722 * decl.c (pop_label): Remove old location code.
2723 (finish_function): Likewise.
2725 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2728 * call.c (magic_varargs_p): Remove BUILT_IN_STDARG_START.
2730 2008-02-26 Richard Guenther <rguenther@suse.de>
2732 * decl.c (duplicate_decls): Remove decl from global mapping
2733 before ggc_freeing it.
2735 2008-02-26 Paolo Carlini <pcarlini@suse.de>
2738 * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
2740 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2742 * typeck.c (build_class_member_access_expr): Add appropriate
2743 OPT_W* parameter to warning.
2744 (build_reinterpret_cast_1): Likewise.
2745 * name-lookup.c (push_overloaded_decl): Likewise.
2747 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2750 * error.c (dump_expr): Handle CONJ_EXPR.
2752 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2755 * error.c (dump_type): Handle FIXED_POINT_TYPE.
2756 (dump_expr): Handle FIXED_CST.
2758 2008-02-24 Jason Merrill <jason@redhat.com>
2760 * parser.c (cp_parser_declaration): Handle "inline namespace".
2761 (cp_parser_namespace_definition): Likewise.
2764 * name-lookup.c (arg_assoc_namespace): Look down into inline
2767 2008-02-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2769 * typeck.c (check_for_casting_away_constness): Use 1 single
2770 argument, the type of cast, to decide what diagnostics generate.
2771 (build_static_cast_1): Remove unused code. Update call to
2772 check_for_casting_away_constness.
2773 (build_reinterpret_cast_1): Update call to
2774 check_for_casting_away_constness.
2775 (build_const_cast_1): Likewise.
2777 2008-02-24 Paolo Carlini <pcarlini@suse.de>
2779 * error.c (dump_expr): Don't deal directly with NEW_EXPR (and
2780 VEC_NEW_EXPR), forward to pp_expression.
2781 * cxx-pretty-print.c (pp_cxx_new_expression): Fix FIXME.
2783 2008-02-24 Danny Smith <dannysmith@users.sourceforge.net>
2786 * friend.c (do_friend): Call cplus_decl_attributes earlier.
2788 2008-02-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
2791 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
2792 template decls' function decl.
2794 2008-02-22 Paolo Carlini <pcarlini@suse.de>
2798 2008-02-14 Paolo Carlini <pcarlini@suse.de>
2801 * pt.c (determine_specialization): In case of function templates,
2802 when the type of DECL does not match FN there is no match.
2804 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2807 * typeck.c (build_binary_op): Warn about floating point
2808 comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
2810 2008-02-19 Jason Merrill <jason@redhat.com>
2813 * pt.c (resolve_overloaded_unification): Set processing_template_decl
2814 while we look for possible bindings.
2816 2008-02-19 Jakub Jelinek <jakub@redhat.com>
2819 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
2823 * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
2824 vars. Afterwards ensure v is VAR_DECL.
2827 * parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
2828 call cp_finish_decl.
2829 * semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
2832 2008-02-15 Douglas Gregor <doug.gregor@gmail.com>
2837 * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
2838 is error_mark_node, return an error early.
2839 (find_parameter_packs_r): Pass the pointer set along to recursive
2840 calls of cp_walk_subtrees; don't try to manage the pointer set
2842 (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
2843 (make_pack_expansion): Ditto.
2844 (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
2845 a second pass through the tree with find_parameter_packs_r; that
2846 second pass no longer does anything.
2847 (push_template_decl_real): If we have an erroneous declaration,
2848 set its type to error_mark_node before returning an error.
2850 2008-02-14 Douglas Gregor <doug.gregor@gmail.com>
2853 * pt.c (tsubst_initializer_list): Deal with the use of
2854 VOID_TYPE_NODE to indicate value-initialization of the bases.
2856 2008-02-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2857 Jason Merrill <jason@redhat.com>
2861 * class.c (type_has_user_nondefault_constructor): New fn.
2862 * cp-tree.h: Declare it.
2863 * init.c (emit_mem_initializers): Use it for -W warning about
2864 missing base initializer.
2866 2008-02-14 Paolo Carlini <pcarlini@suse.de>
2869 * pt.c (determine_specialization): In case of function templates,
2870 when the type of DECL does not match FN there is no match.
2872 2008-02-13 Jakub Jelinek <jakub@redhat.com>
2873 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2876 * parser.c (cp_parser_pseudo_destructor_name): If next tokens
2877 are not identifier :: ~, return before calling cp_parser_type_name.
2879 2008-02-13 Jason Merrill <jason@redhat.com>
2881 PR c++/34962, c++/34937, c++/34939
2882 * decl2.c (is_late_template_attribute): Always defer attributes
2883 vector_size and weak.
2886 * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
2887 of enumerators, too.
2889 2008-02-12 Jason Merrill <jason@redhat.com>
2892 * call.c (convert_like_real): Pass LOOKUP_NO_CONVERSION to build_temp
2893 if we're doing conversions to call a user-defined conversion function.
2895 2008-02-12 Steven Bosscher <steven@gcc.gnu.org>
2898 * semantics.c (finish_qualified_id_expr): Avoid duplicate access
2901 2008-02-12 Jakub Jelinek <jakub@redhat.com>
2904 * init.c (build_new_1): Don't create placement_expr before
2905 constructing alloc_call. Verify that the pointer is passed by
2906 value to operator new.
2908 2008-02-11 Jason Merrill <jason@redhat.com>
2911 * pt.c (tsubst): Don't look up a template typedef in an explicit
2914 2008-02-11 Douglas Gregor <doug.gregor@gmail.com>
2917 * tree.c (cp_build_qualified_type_real): When building a
2918 cv-qualified array type, build it as a unique type with
2919 build_cplus_array_type_1 and then adopt the unqualified type's
2922 2008-02-11 Paolo Carlini <pcarlini@suse.de>
2925 * decl.c (groktypename): Check grokdeclarator return.
2927 2008-02-10 Jason Merrill <jason@redhat.com>
2930 * decl2.c (cp_write_global_declarations): Don't write out static
2931 data members with DECL_IN_AGGR_P set.
2933 2008-02-08 Jason Merrill <jason@redhat.com>
2936 * tree.c (build_target_expr_with_type): Handle void initializer.
2937 (bot_manip): Remap slot before recursing.
2939 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2942 * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
2944 2008-02-06 Alexandre Oliva <aoliva@redhat.com>
2947 * tree.c: Include tree-flow.h.
2948 (build_target_expr): Check type compatibility.
2949 * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
2950 * call.c (convert_like_real): Convert bitfield to expected type.
2952 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
2956 * typeck.c (structural_comptypes): Call cp_comptypes.
2957 (comptypes): New; called from the C/C++ common bits to perform
2959 (cp_comptypes): Renamed from comptypes, which is already used,
2960 with a different signature, by the C++ front end.
2961 (build_reinterpret_cast_1): Call cp_comptypes.
2962 (ptr_reasonably_similar): Ditto.
2963 * decl.c (decls_match): Ditto.
2964 * cvt.c (convert_to_reference): Ditto.
2965 * cp-tree.h (same_type_p): Ditto.
2966 (same_or_base_type_p): Ditto.
2967 (comptypes): Rename to cp_comptypes.
2968 * pt.c (canonical_type_parameter): Call cp_comptypes.
2970 2008-02-05 Jakub Jelinek <jakub@redhat.com>
2973 * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
2974 value dependent expression.
2976 2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
2979 * decl2.c (save_template_attributes): When we're modifying the
2980 TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
2981 all of the other variants to add those same attributes. Otherwise,
2982 the main variant will be inconsistent with those other variants.
2984 2008-02-04 Richard Guenther <rguenther@suse.de>
2987 * decl.c (record_builtin_java_type): Make jboolean a
2988 integer type again where its mode doesn't match that of bool.
2990 2008-02-02 Jason Merrill <jason@redhat.com>
2991 Mark Mitchell <mark@codesourcery.com>
2994 * init.c (build_value_init_1): New function.
2995 (build_value_init): New function.
2996 * typeck2.c (build_functional_cast): Call it.
2997 * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
2999 * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from
3000 TYPE_HAS_CONSTRUCTOR.
3001 * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
3002 add_implicitly_declared_members): Adjust.
3003 (check_field_decls): Adjust. Remove warnings about reference/const
3004 in class without constructor.
3005 (check_bases_and_members): Adjust. Give those warnings here instead.
3006 * decl.c (fixup_anonymous_aggr): Adjust.
3007 (check_initializer): Adjust, clarify logic slightly.
3008 (grok_special_member_properties): Adjust, only set if user-provided.
3009 * rtti.c (create_tinfo_types): Don't set.
3010 * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
3011 Use same_type_ignoring_top_level_qualifiers_p.
3012 * pt.c (check_explicit_specialization): Adjust.
3013 (instantiate_class_template): Adjust.
3015 2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
3016 Jakub Jelinek <jakub@redhat.com>
3020 * typeck.c (structural_comptypes): Handle comparisons of
3021 VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
3023 * mangle.c (write_builtin_type): Map down to the canonical type,
3024 which will be one of the predefined type nodes.
3026 2008-01-29 Michael Meissner <michael.meissner@amd.com>
3029 * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
3030 bits to allow for expansion of the number of middle end tree
3033 2008-01-29 Douglas Gregor <doug.gregor@gmail.com>
3044 * typeck.c (check_return_expr): Tweak call to
3045 check_for_bare_parameter_packs.
3046 * class.c (add_method): Be careful with error_mark_nodes.
3047 * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
3049 * pt.c (struct find_parameter_pack_data): Remove
3051 (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
3052 (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
3053 (make_pack_expansion): Ditto.
3054 (check_for_bare_parameter_packs): Parameter is now a tree, not a
3056 (process_template_parm): Tweak call to
3057 check_for_bare_parameter_packs.
3058 (push_template_decl_real): Tweak calls to
3059 check_for_bare_parameter_packs. If bare parameter packs are found
3060 in the list of exceptions, clear out that list after giving an
3062 * semantics.c (finish_cond): Tweak call to
3063 check_for_bare_parameter_packs.
3064 (finish_expr_stmt): Ditto.
3065 (finish_for_expr): Ditto.
3066 (finish_switch_cond): Ditto.
3067 (finish_mem_initializers): Ditto.
3068 (finish_member_declaration): Ditto.
3069 (finish_static_assert): Check for bare parameter packs in the
3071 * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
3072 attributes of a declaration.
3073 * parser.c (cp_parser_using_declaration): Tweak call to
3074 check_for_bare_parameter_packs.
3075 (cp_parser_base_clause): Ditto.
3077 2008-01-28 Jason Merrill <jason@redhat.com>
3080 * class.c (build_base_path): Fix !want_pointer case.
3082 2008-01-27 Jason Merrill <jason@redhat.com>
3085 * class.c (build_base_path): Fix previous change.
3087 2008-01-26 Jakub Jelinek <jakub@redhat.com>
3090 * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
3093 2008-01-26 Richard Guenther <rguenther@suse.de>
3096 * typeck.c (build_binary_op): Remove code to shorten compares.
3098 2008-01-25 Richard Guenther <rguenther@suse.de>
3101 * decl.c (record_builtin_java_type): Make __java_boolean
3103 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
3104 after TYPE_MAIN_VARIANT check.
3106 2008-01-25 Jason Merrill <jason@redhat.com>
3109 * class.c (build_base_path): Don't mess with virtual access if
3111 * call.c (standard_conversion): Don't check whether source type
3114 * decl2.c (is_late_template_attribute): Don't defer attribute
3115 visibility just because the type is dependent.
3117 2008-01-25 Jason Merrill <jason@redhat.com>
3118 Mark Mitchell <mark@codesourcery.com>
3121 * call.c (standard_conversion): Allow conversion from integer/real
3123 (compare_ics): Such a conversion is worse than a normal arithmetic
3126 2008-01-25 Richard Guenther <rguenther@suse.de>
3129 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
3132 2008-01-24 Paolo Carlini <pcarlini@suse.de>
3135 * pt.c (push_template_decl_real): Return error_mark_node in case
3136 of template definition of non-template.
3138 2008-01-24 Jason Merrill <jason@redhat.com>
3141 * decl2.c (is_late_template_attribute): Defer any attribute with
3142 dependent args. Also defer type attributes if the type is dependent.
3144 2008-01-22 Jakub Jelinek <jakub@redhat.com>
3145 Alexandre Oliva <aoliva@redhat.com>
3148 * call.c (reference_binding): For bitfields use the declared bitfield
3150 (add_builtin_candidates): Likewise.
3151 * class.c (layout_class_type): For bitfields copy over the
3152 original type quals.
3154 2008-01-22 Jason Merrill <jason@redhat.com>
3157 * decl.c (groktypename): Also ignore attributes on dependent
3158 possibly-class types.
3161 * friend.c (do_friend): Check for prior declaration of a friend
3162 function of a local class.
3163 * name-lookup.c (lookup_name_innermost_nonclass_level):
3165 * name-lookup.h: Declare it.
3167 2008-01-22 Tom Tromey <tromey@redhat.com>
3170 * init.c (build_new_1): Only disallow Java aggregates.
3172 2008-01-22 Jakub Jelinek <jakub@redhat.com>
3175 * semantics.c (finish_omp_for): Don't call c_finish_omp_for
3176 if decl or init is error_mark_node.
3179 * error.c (dump_expr): Handle VECTOR_CST.
3181 2008-01-21 Jason Merrill <jason@redhat.com>
3184 * pt.c (tsubst_aggr_type): Make sure our context is complete.
3187 * pt.c (retrieve_local_specialization): Robustify.
3188 (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
3191 * pt.c (tsubst): Only call retrieve_local_specialization if the
3192 original typedef was in a function template.
3195 * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
3197 2008-01-21 Richard Guenther <rguenther@suse.de>
3200 * error.c (cp_print_error_function): Deal with recursive
3203 2008-01-20 Paolo Carlini <pcarlini@suse.de>
3206 * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
3208 2008-01-20 Paolo Carlini <pcarlini@suse.de>
3212 * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
3213 on non-IS_AGGR_TYPE scope.
3214 (constructor_name_p): Assert IS_AGGR_TYPE.
3216 2008-01-18 Ian Lance Taylor <iant@google.com>
3219 * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
3220 (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
3221 DECL_IS_OPERATOR_NEW flag.
3223 2008-01-16 Richard Guenther <rguenther@suse.de>
3226 * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
3227 for conversions to type variants.
3229 2008-01-15 Andreas Tobler <a.tobler@schweiz.org>
3231 * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
3232 declaration and code. Update copyright year.
3234 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3237 * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
3238 know we have a class type.
3240 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3243 * pt.c (coerce_template_parameter_pack): When substituting into
3244 the type of a non-type template parameter pack. use the
3245 deduced/substituted arguments.
3246 * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
3247 can be a parameter pack with the ellipsis following it. When we
3248 have an erroneous declaration, allow it to be a parameter pack.
3249 (cp_parser_template_parameter): Complain about default
3250 arguments on non-type template parameter packs, and parse them
3251 using the new cp_parser_default_argument.
3252 (cp_parser_parameter_declaration): Complain about parameter packs
3253 with default arguments. Move parsing of default arguments into a
3254 new function, cp_parser_default_argument.
3255 (cp_parser_default_argument): New; extracted from
3256 cp_parser_parameter_declaration.
3258 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3264 * typeck.c (check_return_expr): If there are bare parameter packs
3265 in the return value, set it to error_mark_node.
3266 * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
3267 * pt.c (find_parameter_packs_r): Look at the type of
3268 IDENTIFIER_NODEs (e.g., for user-defined conversions).
3269 (check_for_bare_parameter_packs): Flip the result: now returns
3270 TRUE when there were bare parameter packs, FALSE otherwise.
3271 (push_template_decl_real): Deal with flipped result of
3272 check_for_bare_parameter_packs.
3273 * semantics.c (finish_cond): If there are bare parameter packs in
3274 the conditional, set it to error_mark_node.
3275 (finish_expr_stmt): If there are bare parameter packs in the
3276 expression, set it to error_mark_node.
3277 (finish_for_expr): Ditto.
3278 (finish_switch_cond): If there are bare parameter packs in
3279 the conditional, set it to error_mark_node.
3280 (finish_mem_initializers): If there are bare parameter packs in
3281 the member initializer, set it to error_mark_node.
3282 (finish_member_declaration): Check the attributes of the
3283 declaration for bare parameter packs, and remove the attributes if
3284 any have bare parameter packs.
3285 * parser.c (cp_parser_using_declaration): Check the using
3286 declaration for bare parameter packs.
3287 (cp_parser_base_clause): If there are bare parameter packs in a
3288 base specifier, don't add it to the chain.
3290 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3293 * error.c (dump_simple_decl): Display ellipsis for template
3294 non-type parameter packs.
3295 (dump_decl): Display ellipsis for template type parameter packs.
3296 (dump_template_decl): Display ellipsis for template template
3298 * pt.c (redeclare_class_template): When redeclaring a class
3299 template, check for collisions between template parameters and
3300 template parameter packs.
3302 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3305 * pt.c (process_partial_specialization): Don't mark template
3306 parameters that occur in non-deduced contexts.
3307 (struct pair_fn_data): Add include_nondeduced_p.
3308 (for_each_template_parm_r): Only visit non-deduced contexts if
3309 include_nondeduced_p is set.
3310 (for_each_template_parm): Added parameter include_nondeduced_p,
3311 which states whether template parameters found in non-deduced
3312 contexts should be visited.
3313 (uses_template_parms): Visit all template parameters, even those
3314 in non-deduced contexts.
3316 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3319 * pt.c (check_default_tmpl_args): Check for parameter packs that
3320 aren't at the end of a primary template.
3321 (push_template_decl_real): Remove check for parameter packs that
3322 aren't at the end of a primary template; that now happens in
3323 check_default_tmpl_args.
3324 * semantics.c (finish_template_template_parm): Use
3325 check_default_tmpl_args to check for errors in the template
3328 2008-01-12 Doug Kwan <dougkwan@google.com>
3330 * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
3331 instead of OPT_Wreturn_type in warning due to ignored return type
3333 * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
3334 instead of OPT_Wreturn_type in warning due to ignored return type
3337 2008-01-08 Jakub Jelinek <jakub@redhat.com>
3340 * semantics.c (finish_omp_for): Don't call
3341 fold_build_cleanup_point_expr if processing_template_decl.
3343 2008-01-04 Paolo Carlini <pcarlini@suse.de>
3344 Jakub Jelinek <jakub@redhat.com>
3347 * error.c (dump_template_argument): Deal with TREE_LIST.
3349 2008-01-01 Douglas Gregor <doug.gregor@gmail.com>
3351 * parser.c (cp_parser_check_decl_spec): Don't warn about "long
3352 long" in C++0x mode; change the warning to note that "long long"
3353 is only unsupported in C++98 mode.
3355 2007-12-20 Jason Merrill <jason@redhat.com>
3358 * call.c (standard_conversion): Derived-to-base is considered a
3359 standard conversion.
3361 2007-12-19 Jakub Jelinek <jakub@redhat.com>
3364 * parser.c (cp_parser_omp_parallel): For non-combined parallel
3365 call cp_parser_statement rather than
3366 cp_parser_already_scoped_statement.
3368 2007-12-18 Jason Merrill <jason@redhat.com>
3371 * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
3373 (dependent_type_p_r): Handle the domain of an array.
3375 2007-12-18 Douglas Gregor <doug.gregor@gmail.com>
3376 Jakub Jelinek <jakub@redhat.com>
3381 * pt.c (template_template_parm_bindings_ok_p): New; verifies
3382 bindings of template template parameters after all template
3383 arguments have been deduced.
3384 (coerce_template_parms): Don't complain when COMPLAIN doesn't
3386 (fn_type_unification): Use template_template_parm_bindings_ok_p.
3387 (unify): Deal with variadic, bound template template parameters.
3388 (get_class_bindings): Use template_template_parm_bindings_ok_p.
3390 2007-12-18 Jakub Jelinek <jakub@redhat.com>
3393 * decl.c (grokdeclarator): Reject friend sfk_constructor
3396 2007-12-17 Jakub Jelinek <jakub@redhat.com>
3399 * parser.c (cp_parser_omp_all_clauses): Accept optional comma
3402 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
3405 * cp-lang.c (cp_classify_record): New.
3406 (LANG_HOOKS_CLASSIFY_RECORD): Override.
3408 2007-12-11 Jakub Jelinek <jakub@redhat.com>
3411 * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
3414 * rtti.c (build_dynamic_cast): Call convert_from_reference even for
3415 dynamic_cast in a template.
3417 2007-12-10 Simon Martin <simartin@users.sourceforge.net>
3420 * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
3421 MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
3423 2007-12-10 Jakub Jelinek <jakub@redhat.com>
3426 * error.c (dump_type_prefix, dump_type_suffix): Handle
3427 TYPE_PACK_EXPANSION.
3430 * error.c (dump_expr): Handle ABS_EXPR.
3432 2007-12-09 Jakub Jelinek <jakub@redhat.com>
3436 * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
3437 in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
3438 Return 2 also if DECL_EXPLICIT_INSTANTIATION.
3439 * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
3440 flag_use_repository and repo_emit_p returned 2.
3442 2007-12-06 Jakub Jelinek <jakub@redhat.com>
3445 * tree.c (stabilize_call, stabilize_init): Do nothing if
3446 processing_template_decl.
3448 2007-12-05 Jakub Jelinek <jakub@redhat.com>
3451 * semantics.c (finish_decltype_type): For SCOPE_REF issue an
3452 error instead of assertion failure.
3453 * parser.c (cp_parser_decltype): If closing paren is not found,
3454 return error_mark_node.
3456 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3459 * name-lookup.c (arg_assoc_template_arg): Recurse on argument
3461 (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
3462 since arg_assoc_template_arg will deal with them (better).
3464 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3467 * pt.c (tsubst_exception_specification): Handle substitutions into
3468 member templates, where tsubst_pack_expansion returns a
3469 TYPE_PACK_EXPANSION.
3471 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3474 * pt.c (unify_pack_expansion): If we didn't deduce any actual
3475 bindings for the template parameter pack, don't try to keep the
3476 empty deduced arguments.
3477 (unify): If a parameter is a template-id whose template argument
3478 list contains a pack expansion that is not at the end, then we
3479 cannot unify against that template-id.
3481 2007-12-02 Paolo Carlini <pcarlini@suse.de>
3484 * pt.c (current_template_args): Use error_operand_p.
3486 2007-12-02 Paolo Carlini <pcarlini@suse.de>
3489 * error.c (dump_decl): Handle TREE_BINFO.
3491 2007-12-01 Ollie Wild <aaw@google.com>
3494 * typeck.c (build_binary_op): Add conversion of pointers to function
3495 members appearing as operands to the equality operators.
3497 2007-11-30 Jakub Jelinek <jakub@redhat.com>
3500 * error.c (dump_expr): Handle OBJ_TYPE_REF.
3502 2007-11-29 Jakub Jelinek <jakub@redhat.com>
3505 * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
3507 * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
3512 * parser.c (cp_parser_decltype): Don't call finish_id_expression
3514 * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
3517 2007-11-27 Jakub Jelinek <jakub@redhat.com>
3519 PR tree-optimization/34181
3520 * method.c (use_thunk): Don't inline the call in the thunk.
3523 * tree.c (decl_linkage): Static data members and static member
3524 functions in anonymous ns classes are lk_external.
3526 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
3529 * decl.c (start_preparsed_function): Pass
3530 processing_template_decl for the new allocate_struct_function
3533 2007-11-25 Richard Guenther <rguenther@suse.de>
3535 * decl.c (poplevel): Use BLOCK_CHAIN.
3537 2007-11-24 Ollie Wild <aaw@google.com>
3539 * typeck.c (delta_from_ptrmemfunc): New function.
3540 (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
3541 (build_binary_op): Call delta_from_ptrmemfunc.
3543 2007-11-23 Jakub Jelinek <jakub@redhat.com>
3547 * decl.c (cp_finish_decl): Disallow variable or field
3548 definitions if extern "Java" aggregates.
3549 (grokparms): Disallow parameters with extern "Java"
3551 (check_function_type): Disallow function return values
3552 with extern "Java" aggregates.
3553 * init.c (build_new_1): Disallow placement new with
3554 extern "Java" aggregates.
3556 2007-11-23 Mark Mitchell <mark@codesourcery.com>
3557 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3560 * call.c (convert_like_real): Build a zero constant when __null is
3561 converted to an integer type.
3563 2007-11-22 Jakub Jelinek <jakub@redhat.com>
3566 * decl2.c (cp_write_global_declarations): Issue error about static
3567 data members in anonymous namespace which are declared and used,
3570 2007-11-20 Jakub Jelinek <jakub@redhat.com>
3573 * parser.c (cp_parser_class_head): Reject function template ids.
3576 * tree.c (build_cplus_array_type_1): Don't pass any VLA types
3577 when processing_template_decl to build_array_type.
3580 * pt.c (more_specialized_fn): Don't segfault if one or
3581 both argument list end with ellipsis.
3583 2007-11-18 Jakub Jelinek <jakub@redhat.com>
3586 * semantics.c (finish_call_expr): Set
3587 current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
3588 or OVERLOAD with all noreturn functions.
3590 2007-11-16 Jakub Jelinek <jakub@redhat.com>
3593 * pt.c (apply_late_template_attributes): Do nothing if decl's type is
3596 2007-11-13 Jakub Jelinek <jakub@redhat.com>
3603 * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
3604 set to error_mark_node the outermost POINTER_TYPE to the pack if
3605 it is seen in a POINTER_TYPE.
3606 (push_template_decl_real): If check_for_bare_parameter_packs
3607 fails for function return type, set the return type to
3608 integer_type_node. If check_for_bare_parameter_packs failed
3609 for non-function, return error_mark_node.
3612 * call.c (build_new_op): Call resolve_args before calling
3615 2007-11-11 Tom Tromey <tromey@redhat.com>
3618 * lex.c (handle_pragma_implementation): Use cpp_included_before.
3620 2007-11-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3623 * pt.c (redeclare_class_template): Update error message. Use a
3624 note to show the previous declaration.
3625 (tsubst_friend_class): Use the location of the friend template as
3626 the input location before calling redeclare_class_template.
3628 2007-11-11 Jakub Jelinek <jakub@redhat.com>
3631 * semantics.c (finish_pseudo_destructor_expr): Handle
3632 object == error_mark_node.
3634 2007-11-10 Jakub Jelinek <jakub@redhat.com>
3637 * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
3638 is not scalar type, let finish_class_member_access_expr handle
3639 diagnostics. Pass BIT_NOT_EXPR argument to
3640 finish_pseudo_destructor_expr. Handle SCOPE_REF properly.
3642 2007-11-09 Douglas Gregor <doug.gregor@gmail.com>
3645 * decl.c (cp_complete_array_type): If any of the initializer
3646 elements are pack expansions, don't compute the array size yet.
3648 2007-11-08 Andrew Pinski <pinskia@gmail.com>
3651 * tree.c (decl_linkage): Fields have no linkage.
3653 2007-11-08 Daniel Jacobowitz <dan@codesourcery.com>
3655 * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
3657 2007-11-07 Douglas Gregor <doug.gregor@gmail.com>
3662 * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
3663 Be careful with ERROR_MARK_NODEs.
3664 * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
3667 2007-11-07 Jakub Jelinek <jakub@redhat.com>
3670 * call.c (build_over_call): Don't check TREE_ADDRESSABLE
3673 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
3677 * tree.c (c_build_qualified_type): Define bridge to
3678 cp_build_qualified_type.
3680 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
3691 * typeck.c (check_return_expr): Pass address of retval to
3692 check_for_bare_parameter_packs.
3693 * class.c (build_base_field): Tolerate bases that have no layout
3695 (end_of_base): Ditto.
3696 * tree.c (canonical_type_variant): Be careful with
3698 * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
3700 * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
3701 which states whether parameter packs should be replaced with
3703 (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
3704 possible. If set_packs_to_error is set true, replace the parameter
3705 pack with ERROR_MARK_NODE. Manage our own pointer sets.
3706 (uses_parameter_packs): Don't set parameter packs to
3708 (check_for_bare_parameter_packs): Now takes a pointer to a tree,
3709 which may be modified (if it is a parameter pack). Instructs
3710 find_parameter_packs_r to replace parameter packs with
3711 ERROR_MARK_NODE (so that they won't cause errors later on).
3712 (process_template_parm): Pass pointer to
3713 check_for_bare_parameter_packs.
3714 (process_partial_specialization): Replace pack expansions before
3715 the end of the template argument list with ERROR_MARK_NODE.
3716 (push_template_decl_real): Pass pointer to
3717 check_for_bare_parameter_packs. Replace parameter packs not at the
3718 end of the template parameter list with ERROR_MARK_NODE.
3719 (convert_template_argument): Be more careful about using DECL_NAME
3720 on only declarations.
3721 (unify): Can't unify against ERROR_MARK_NODE.
3722 * semantics.c (finish_cond): Pass pointer to
3723 check_for_bare_parameter_packs.
3724 (finish_expr_stmt): Ditto.
3725 (finish_for_expr): Ditto.
3726 (finish_switch_cond): Pass pointer to
3727 check_for_bare_parameter_packs, and call it before we put the
3728 condition into the statement.
3729 (finish_mem_initializers): Pass pointer to
3730 check_for_bare_parameter_packs.
3731 (finish_member_declaration): Ditto.
3732 * parser.c (cp_parser_base_clause): Ditto.
3734 2007-11-06 Jakub Jelinek <jakub@redhat.com>
3737 * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
3738 with the final TREE_READONLY flag in place. processing_template_decl
3739 is known to be 0 in this part of function.
3742 * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
3743 OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
3744 * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
3745 * semantics.c (finish_omp_atomic): Revert most of the
3746 2007-02-05 changes, just keep the new representation of
3747 OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
3749 2007-11-05 H.J. Lu <hongjiu.lu@intel.com>
3752 * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
3755 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
3760 * typeck.c (merge_types): Don't lose rvalue references when
3762 * call.c (build_over_call): Don't elide move constructors just
3763 because the copy constructor is trivial (!).
3764 (compare_ics): If comparing cv-qualifiers fails, we can still order
3765 based on binding lvalues vs. rvalues.
3767 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
3770 * pt.c (unify_pack_expansion): bring handling of function call
3771 arguments into line with type_unification_real.
3773 2007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3775 * typeck.c (build_binary_op): Use pedwarn instead of error for
3778 2007-11-05 Jakub Jelinek <jakub@redhat.com>
3781 * parser.c (cp_parser_unary_expression): For &&label call
3782 cp_parser_non_integral_constant_expression and return error_mark_node
3783 if it returned true.
3786 * decl.c (grokdeclarator): Don't call build_memfn_type if type
3787 is neither FUNCTION_TYPE nor METHOD_TYPE.
3789 2007-11-02 Jakub Jelinek <jakub@redhat.com>
3792 * parser.c (cp_parser_nested_name_specifier_opt): Use
3793 TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
3794 typedef of currently open class.
3796 2007-11-02 Paolo Carlini <pcarlini@suse.de>
3799 * error.c (dump_expr): Deal specially with statements.
3801 2007-11-01 Jason Merrill <jason@redhat.com>
3804 * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
3806 (lookup_template_class): Use it to get the outer template args
3807 for instantiating one.
3810 * pt.c (reduce_template_parm_level): tsubst the parameters
3811 of a template template parm.
3813 2007-11-01 Douglas Gregor <doug.gregor@gmail.com>
3816 * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
3818 2007-11-01 Jakub Jelinek <jakub@redhat.com>
3821 * parser.c (cp_parser_postfix_dot_deref_expression): If
3822 POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
3823 first and if that succeeds and type is SCALAR_TYPE_P, create
3827 * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
3828 (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
3829 as for std::type_info.
3831 2007-10-31 Paolo Carlini <pcarlini@suse.de>
3834 * cxx-pretty-print.c (pp_cxx_typeid_expression,
3835 pp_cxx_delete_expression): Change to static linkage.
3836 * cxx-pretty-print.h: Adjust declarations.
3837 * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
3838 MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
3839 MODOP_EXPR): Forward to pp_expression.
3841 * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
3844 2007-10-31 Christian Bruel <christian.bruel@st.com>
3845 Mark Mitchell <mark@codesourcery.com>
3848 * typeck.c (check_return_expr): Don't set named_return_value_okay_p
3849 if retval is volatile.
3851 2007-10-30 Jakub Jelinek <jakub@redhat.com>
3854 * decl2.c (build_offset_ref_call_from_tree): Call
3855 build_non_dependent_expr on object prior to building ADDR_EXPR from it
3856 if FN is DOTSTAR_EXPR.
3858 2007-10-30 Douglas Gregor <doug.gregor@gmail.com>
3862 * pt.c (find_parameter_packs_r): Fix typo in comment.
3863 (convert_template_argument): Look at the pattern of a pack
3864 expansion to determine what kind of entity we're converting.
3865 (coerce_template_parameter_pack): When we have coerced a non-type
3866 template parameter pack, substitute into the type of that pack.
3867 (tsubst_pack_expansion): When our substitution of a parameter pack
3868 is a "trivial" substitution of itself, just substitute into the
3869 pack expansion rather than actually expanding.
3871 2007-10-29 Jakub Jelinek <jakub@redhat.com>
3874 * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
3875 for non-integral type bitfields. Return true if bitfield is correct, false
3876 error has been diagnosed.
3877 (check_field_decls): If check_bitfield_decl returned false, call also
3880 2007-10-28 Paolo Carlini <pcarlini@suse.de>
3881 Mark Mitchell <mark@codesourcery.com>
3884 * pt.c (do_decl_instantiation): If the VAR_DECL is not a
3885 class member error out and return.
3887 2007-10-27 Jakub Jelinek <jakub@redhat.com>
3889 * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
3890 to current_function_decl rather than 0.
3893 * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
3895 * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
3897 2007-10-27 Jason Merrill <jason@redhat.com>
3900 * call.c (convert_default_arg): Detect recursion.
3902 2007-10-27 Jakub Jelinek <jakub@redhat.com>
3905 * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
3906 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
3908 (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
3910 * error.c (dump_expr): Handle OFFSETOF_EXPR.
3912 2007-10-26 Jason Merrill <jason@redhat.com>
3915 * pt.c (get_template_info): New fn.
3916 (template_class_depth): Use it.
3917 (push_template_decl_real): Check that the template args of the
3918 definition match the args of the previous declaration.
3920 2007-10-26 Paolo Carlini <pcarlini@suse.de>
3923 * decl2.c (coerce_new_type): Do not allow a default argument for
3924 the first parameter.
3926 2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
3929 * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
3930 don't see the leading '('. Only lookup names if we get an
3933 2007-10-26 Jakub Jelinek <jakub@redhat.com>
3936 * parser.c (cp_parser_parenthesized_expression_list): Set
3937 greater_than_is_operator_p to true in between the parens.
3939 2007-10-26 Paolo Carlini <pcarlini@suse.de>
3942 * decl.c (grokdeclarator): In case of conflicting specifiers
3943 just return error_mark_node.
3945 2007-10-26 Ollie Wild <aaw@google.com>
3947 * expr.c (cxx_expand_expr): Removed.
3948 * cp-tree.h (exx_expand_expr): Removed.
3949 * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
3952 2007-10-25 Paolo Carlini <pcarlini@suse.de>
3955 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
3957 2007-10-23 Jason Merrill <jason@redhat.com>
3959 PR c++/25950 (DR 391)
3960 * call.c (struct conversion): Remove check_copy_constructor_p.
3961 (reference_binding): Always bind a reference directly to a
3962 compatible class rvalue. Pass down LOOKUP_NO_TEMP_BIND during
3964 (check_constructor_callable): Remove.
3965 (convert_like_real): Don't call it.
3966 (initialize_reference): Don't call check_constructor_callable.
3967 (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
3968 LOOKUP_CONSTRUCTOR_CALLABLE. Don't require a temporary for base
3969 conversions if LOOKUP_NO_TEMP_BIND.
3970 (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
3971 (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
3973 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
3975 2007-10-22 Jakub Jelinek <jakub@redhat.com>
3978 * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
3979 before checking if its type is integral.
3981 2007-10-22 Jason Merrill <jason@redhat.com>
3984 * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
3985 * pt.c (apply_late_template_attributes): Splice out dependent
3986 attributes from DECL_ATTRIBUTES.
3988 * decl.c (cxx_maybe_build_cleanup): Use build_address.
3990 2007-10-17 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3992 * typeck.c (build_binary_op) : Use appropriate warning option
3993 instead of unnamed warning.
3995 2007-10-16 Paolo Carlini <pcarlini@suse.de>
3998 * pt.c (current_template_args): Do not change TREE_LIST elements
3999 with a TREE_VALUE of error_mark_node.
4001 2007-10-16 Mark Mitchell <mark@codesourcery.com>
4003 * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
4004 * decl.c (start_decl): Tidy.
4005 (start_decl_1): Call cp_apply_type_quals_to_decl after completing
4007 (grokdeclarator): Clarify comment.
4009 2007-10-14 Andrew Pinski <pinskia@gmail.com>
4012 * decl.c (grokfndecl): Return NULL after the "definition of
4013 implicitly-declared" error happened.
4015 2007-10-12 Simon Martin <simartin@users.sourceforge.net>
4018 * call.c (build_user_type_conversion_1): Do not consider conversion
4019 functions to convert a (possibly cv-qualified) object to the (possibly
4020 cv-qualified) same object type (or a reference to it), to a (possibly
4021 cv-qualified) base class of that type (or a reference to it).
4023 2007-10-12 Paolo Carlini <pcarlini@suse.de>
4025 * pt.c (tsubst): Use template_parm_level_and_index.
4027 2007-10-12 Jakub Jelinek <jakub@redhat.com>
4030 * parser.c (cp_parser_compound_statement): Handle label-declarations
4031 at the beginning of the compound statement.
4032 (cp_parser_block_declaration): Issue diagnostics about __label__
4033 not at the beginning of a block.
4035 2007-10-11 Paolo Carlini <pcarlini@suse.de>
4038 * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
4039 to convert_template_argument.
4040 (coerce_template_parms): Return error_mark_node after fixed-length
4042 (tsubst_decl): Check for error_mark_node the return value of the
4043 first tsubst in 'case VAR_DECL'.
4045 2007-10-08 Ollie Wild <aaw@google.com>
4047 * typeck2.c (digest_init): Call cplus_expand_constant after
4048 convert_for_initialization.
4049 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
4050 * expr.c (cplus_expand_constant): Updated function description.
4052 2007-10-04 Jason Merrill <jason@redhat.com>
4055 * call.c (initialize_reference): Handle local static reference
4058 2007-10-03 Jason Merrill <jason@redhat.com>
4061 * name-lookup.c (push_namespace_with_attrs): Fold back into...
4062 (push_namespace): Here.
4063 (handle_namespace_attrs): New fn for the attr code.
4064 (leave_scope): Don't pop_visibility.
4065 * name-lookup.h (struct cp_binding_level): Remove has_visibility.
4066 * parser.c (cp_parser_namespace_definition): Call
4067 handle_namespace_attrs and pop_visibility as appropriate.
4070 * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
4072 2007-10-03 Alexandre Oliva <aoliva@redhat.com>
4074 * decl.c (duplicate_decls): Preserve linkage flags for mere
4075 redeclarations of gnu_inline definitions.
4077 2007-10-03 Jason Merrill <jason@redhat.com>
4080 * decl.c (wrap_cleanups_r): New fn.
4081 (wrap_temporary_cleanups): New fn.
4082 (initialize_local_var): Call it.
4084 2007-09-29 Jason Merrill <jason@redhat.com>
4087 * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
4088 constant to not have DECL_EXTERNAL if it's file-local.
4090 2007-09-28 Ollie Wild <aaw@google.com>
4093 2007-09-27 Ollie Wild <aaw@google.com>
4095 * typeck2.c (digest_init): Call cplus_expand_constant after
4096 convert_for_initialization.
4097 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
4098 * expr.c (cplus_expand_constant): Updated function description.
4100 2007-09-28 Jason Merrill <jason@redhat.com>
4103 * class.c (layout_empty_base): Take rli parameter, update
4104 rli->record_align if empty base has user-specified alignment.
4105 (build_base_field): Pass rli to it.
4107 2007-09-28 Paolo Carlini <pcarlini@suse.de>
4110 * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
4112 2007-09-28 Paolo Carlini <pcarlini@suse.de>
4115 * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
4116 (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
4117 (dump_parameters): Just call dump_type for argument packs too.
4119 2007-09-28 Jakub Jelinek <jakub@redhat.com>
4122 * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
4123 qualification by creating qualified PACK_EXPANSION_PATTERN and
4124 then calling make_pack_expansion on it.
4126 2007-09-27 Ollie Wild <aaw@google.com>
4128 * typeck2.c (digest_init): Call cplus_expand_constant after
4129 convert_for_initialization.
4130 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
4131 * expr.c (cplus_expand_constant): Updated function description.
4133 2007-09-27 Jason Merrill <jason@redhat.com>
4136 * decl2.c (is_late_template_attribute): Don't crash on unknown
4139 2007-09-27 Paolo Carlini <pcarlini@suse.de>
4142 * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
4143 * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
4144 spaces in the formatting.
4145 * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
4147 2007-09-27 Jakub Jelinek <jakub@redhat.com>
4149 * error.c (cxx_print_error_function): Add third argument, pass
4150 it over to lhd_print_error_function.
4151 (cp_print_error_function): If diagnostic->abstract_origin, print
4153 * cp-tree.h (struct diagnostic_info): New forward decl.
4154 (cxx_print_error_function): Add third argument.
4156 2007-09-25 Simon Martin <simartin@users.sourceforge.net>
4159 * name-lookup.c (pushtag): Do not create an implicit typedef before
4160 the associated type declaration is known to be valid.
4162 2007-09-25 Jakub Jelinek <jakub@redhat.com>
4164 * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
4165 rather than pointers.
4167 2007-09-24 Danny Smith <dannysmith@user.sourceforge.net>
4170 * search.c (check_final_overrider): Fail if
4171 targetm.comp_type_attributes returns 0.
4173 2007-09-24 Jason Merrill <jason@redhat.com>
4176 * pt.c (resolve_typename_type): Don't look things up in the original
4177 template if it would mean losing template arguments.
4179 2007-09-24 Jakub Jelinek <jakub@redhat.com>
4182 * cp-tree.h (cxx_type_hash_eq): New prototype.
4183 * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
4184 * tree.c (cxx_type_hash_eq): New function.
4186 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
4189 * tree.c (cp_build_qualified_type_real): Build a canonical
4190 ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
4192 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
4196 * tree.c (cplus_array_compare): Compare pointers, not types.
4197 (build_cplus_array_type_1): Store new array type into the hash
4198 table before building the canonical type; build the canonical type
4200 (cp_build_qualified_type_real): Put all of the array types with
4201 cv-qualified element types into the C++ array hash table, built as
4202 variants of the unqualified versions.
4204 2007-09-23 Jason Merrill <jason@redhat.com>
4207 * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
4208 for deprecation warnings.
4210 2007-09-22 Jason Merrill <jason@redhat.com>
4213 * call.c (build_over_call): Warn about deprecated virtuals.
4216 * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
4217 (MAYBE_TAGGED_TYPE_P): Remove.
4218 * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
4219 instead of calling is_late_template_attribute again.
4220 (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
4221 (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
4222 Don't crash on typedefs from non-template classes.
4223 * decl2.c (grokfield): Don't sorry about attrs on template parms.
4224 (is_late_template_attribute): All attributes applied to template
4225 parms or typename types are dependent. Static.
4226 (splice_template_attributes): Pass decl through.
4227 (save_template_attributes): Likewise.
4229 2007-09-20 Jakub Jelinek <jakub@redhat.com>
4232 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
4233 returned from tsubst_pack_expansion.
4234 (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
4235 (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
4237 2007-09-20 Paolo Carlini <pcarlini@suse.de>
4240 * semantics.c (finish_id_expression): Use consistently
4241 context_for_name_lookup.
4242 * decl.c (fixup_anonymous_aggr): Fix error message for
4243 anonymous struct (vs union).
4245 2007-09-19 Jason Merrill <jason@redhat.com>
4248 * pt.c (tsubst): Handle typedefs by looking for the specialization.
4249 (retrieve_specialization): Only tagged types use
4250 DECL_TEMPLATE_INSTANTIATIONS.
4251 (instantiate_class_template): Push nested classes too.
4252 (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
4254 * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
4255 * init.c (is_aggr_type): Remove redundant tests.
4256 * class.c (push_nested_class): Use CLASS_TYPE_P.
4258 2007-09-20 Paolo Carlini <pcarlini@suse.de>
4261 * init.c (build_zero_init): If, recursively, build_zero_init
4262 returns a NULL_TREE, do not append it to the VEC of constructors.
4264 2007-09-18 Jason Merrill <jason@redhat.com>
4267 * pt.c (apply_late_template_attributes): Set processing_template_decl.
4268 (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
4269 ATTR_FLAG_TYPE_IN_PLACE.
4270 (tsubst): Do unqualified lookup to find typedefs from current class.
4271 [ARRAY_TYPE]: Propagate alignment info.
4272 * decl2.c (is_late_template_attribute): Only defer handling of
4273 attribute aligned if the expression is dependent.
4274 (save_template_attributes): If we're deferring any attributes,
4275 make this a naming typedef.
4277 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4279 PR c++/33462 (again)
4280 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
4281 va_arg instead of __builtin_va_arg.
4283 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4286 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
4287 (pp_cxx_primary_expression): Use it.
4288 * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
4289 * error.c (dump_expr): Use it.
4291 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4294 * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
4295 out case TYPEID_EXPR to...
4296 (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
4297 and pp_cxx_right_paren.
4298 * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
4299 * error.c (dump_expr): Use it.
4301 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4304 * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
4305 (pp_cxx_primary_expression): Use it.
4306 * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
4307 * error.c (dump_expr): Use it.
4309 2007-09-16 Paolo Carlini <pcarlini@suse.de>
4312 * init.c (build_new): Remove warning for zero-element
4315 2007-09-16 Nathan Sidwell <nathan@codesourcery.com>
4318 * call.c (maybe_handle_implicit_object): Set this_p, clear
4319 rvaluedness_matches_p.
4320 (compare_ics): Do not compare rvaluedness matching when one of the
4321 operands is an implicit object.
4323 2007-09-14 Jason Merrill <jason@redhat.com>
4325 PR c++/17743, c++/19163
4326 * decl2.c (is_late_template_attribute): New fn.
4327 (splice_template_attributes, save_template_attributes): New fns.
4328 (cplus_decl_attributes): Call save_template_attributes.
4329 * pt.c (apply_late_template_attributes): New fn.
4330 (instantiate_class_template, tsubst_decl): Use it.
4331 * cp-tree.h: Declare is_late_template_attribute.
4333 2007-09-13 Tom Tromey <tromey@redhat.com>
4335 * parser.c (cp_lexer_new_main): Don't use
4336 c_lex_return_raw_strings.
4337 (cp_lexer_get_preprocessor_token): Update. Add special case when
4340 2007-09-11 Jan Hubicka <jh@suse.cz>
4342 * method.c (use_thunk): Use tree_rest_of_compilation
4343 * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
4344 (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
4345 * cp-tree.h (expand_body): Kill.
4346 (emit_associated_thunks): Declare.
4347 * semantics.c (emit_associated_thunks): Export.
4348 (expand_body): Kill.
4350 2007-09-09 David Daney <ddaney@avtrex.com>
4353 * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
4354 to calculate cookie_ptr.
4356 2007-09-08 Jason Merrill <jason@redhat.com>
4359 * pt.c (most_specialized_class): Set processing_template_decl
4360 while tsubsting partial spec args.
4362 2007-09-06 Jason Merrill <jason@redhat.com>
4364 * decl2.c (get_guard): Copy visibility from the guarded variable.
4366 2007-09-06 Jan Hubicka <jh@suse.cz>
4368 * semantics.c (expand_body): Do not mark arguments of clones used.
4370 2007-09-06 Paolo Carlini <pcarlini@suse.de>
4373 * decl.c (cp_finish_decl): When processing_template_decl,
4374 deal correctly with init as TREE_LIST.
4376 2007-09-06 Tom Tromey <tromey@redhat.com>
4378 * decl.c (finish_function): Put return's location on line zero of
4381 2007-09-05 Jason Merrill <jason@redhat.com>
4384 * except.c (prepare_eh_type): Use type_decays_to.
4387 * init.c (build_delete): Use build_headof to get the address of the
4388 complete object if we aren't using the deleting destructor.
4389 * rtti.c (build_headof): No longer static.
4390 * cp-tree.h: Declare it.
4392 2007-09-06 Jakub Jelinek <jakub@redhat.com>
4394 * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
4395 decl if a prototype for XX is provided with throw().
4398 * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
4399 on __*_chk non-__builtin_* decls.
4401 2007-09-05 Paolo Carlini <pcarlini@suse.de>
4404 * semantics.c (finish_id_expression): Use context_for_name_lookup
4405 insted of DECL_CONTEXT, to see through anonymous structs and unions.
4406 * class.c (finish_struct_anon): Deal correctly with anonymous
4407 structs (vs unions, as GNU extension) in error messages.
4409 2007-09-05 Jan Hubicka <jh@suse.cz>
4411 * sematics.c (expand_body): Remove unnecesary import_export_decl
4412 call, DECL_EXTERNAL checks and current_function_decl saving.
4414 2007-09-05 Paolo Carlini <pcarlini@suse.de>
4416 PR c++/29731 (again)
4417 * parser.c (cp_parser_primary_expression): Return error_mark_node
4418 when a statement-expression is found in a template-argument list.
4420 2007-09-04 Jason Merrill <jason@redhat.com>
4422 * except.c (initialize_handler_parm): Use
4423 fold_build_cleanup_point_expr.
4426 * call.c (reference_binding): Don't look for user-defined conversions
4430 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
4431 the MUST_NOT_THROW_EXPR.
4433 2007-09-04 Richard Sandiford <richard@codesourcery.com>
4435 * decl.c (cp_finish_decl): Call determine_visibility before
4436 make_rtl_for_nonlocal_decl.
4438 2007-09-04 Jason Merrill <jason@redhat.com>
4441 * pt.c (most_specialized_class): Substitute outer template
4442 arguments into the arguments of a member template partial
4444 (strip_innermost_template_args): New fn.
4446 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
4448 * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
4450 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4452 * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
4453 * decl.c (cp_make_fname_decl): Likewise,
4454 * parser.c (cp_parser_string_literal): Likewise,
4455 * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
4456 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
4459 2007-09-02 Paolo Carlini <pcarlini@suse.de>
4462 * typeck.c (build_unary_op): Fix error message for
4463 Boolean expression as operand to operator--.
4465 2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4467 * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
4468 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
4471 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
4474 * init.c (build_default_init): Make extern.
4475 * cp-tree.h (build_default_init): Declare here.
4476 * pt.c (tsubst_expr): When the instantiation of the initializer of
4477 a variable results in an empty list, default-initialize the
4479 (tsubst_copy_and_build): When the instantiation of the initializer
4480 in a new expression results in an empty initializer list,
4481 default-initialize it.
4483 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
4485 * mangle.c (write_type): Change mangling of rvalue reference from
4488 2007-08-31 Jakub Jelinek <jakub@redhat.com>
4490 * decl.c (duplicate_decls): Remove duplicated line.
4492 2007-08-31 Paolo Carlini <pcarlini@suse.de>
4495 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
4496 BOUND_TEMPLATE_TEMPLATE_PARM.
4498 2007-08-31 Paolo Carlini <pcarlini@suse.de>
4501 * search.c (lookup_member): Check the name argument for
4504 2007-08-31 Paolo Carlini <pcarlini@suse.de>
4507 * parser.c (cp_parser_trait_expr): Check rerurn value of
4510 2007-08-30 Ollie Wild <aaw@google.com>
4512 * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
4513 convert_ptrmem for pointer to member conversions.
4514 (convert_to_pointer_force): Update cp_convert_to_pointer call.
4515 (ocp_convert): Update cp_convert_to_pointer call.
4516 * typeck.c (convert_ptrmem): Add conditional for null pointers to
4518 (build_static_cast_1): Check can_convert for conversions in either
4520 (get_delta_difference_1): New function.
4521 (get_delta_difference): Refactor to call get_delta_difference_1.
4523 2007-08-30 Jakub Jelinek <jakub@redhat.com>
4525 * decl.c (start_preparsed_function): Set
4526 DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
4528 2007-08-28 Paolo Carlini <pcarlini@suse.de>
4531 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
4532 BOUND_TEMPLATE_TEMPLATE_PARM.
4534 2007-08-28 Jakub Jelinek <jakub@redhat.com>
4538 * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
4539 and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
4541 2007-08-27 Jason Merrill <jason@redhat.com>
4544 * pt.c (build_non_dependent_expr, type_dependent_expression_p):
4545 Look inside STMT_EXPR.
4546 * semantics.c (stmt_expr_value_expr): New fn.
4547 * cp-tree.h: Declare it.
4550 * decl.c (groktypename): Ignore attributes applied to class type.
4552 2007-08-28 Richard Guenther <rguenther@suse.de>
4554 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
4556 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
4558 * error.c (dump_expr): Handle COMPLEX_CST.
4559 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
4560 (pp_cxx_expression): Likewise.
4562 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
4564 * decl.c (GNU_INLINE_P): New.
4565 (duplicate_decls): Handle gnu_inline. Merge attributes and
4566 some flags in overriding definitions.
4567 (redeclaration_error_message): Handle gnu_inline.
4568 (start_preparsed_function): Likewise.
4570 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4572 * call.c (sufficient_parms_p): Constify.
4573 * class.c (same_signature_p): Likewise.
4574 * cp-gimplify.c (is_invisiref_parm,
4575 cxx_omp_privatize_by_reference): Likewise.
4576 * cp-objcp-common.c (has_c_linkage): Likewise.
4577 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
4578 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
4579 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
4580 num_artificial_parms_for, comp_template_parms,
4581 template_parameter_pack_p, any_dependent_template_arguments_p,
4582 any_type_dependent_arguments_p, any_value_dependent_elements_p,
4583 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
4584 zero_init_p, member_p, cp_lvalue_kind,
4585 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
4586 varargs_function_p, is_dummy_object, special_function_kind,
4587 string_conv_p, type_unknown_p, comp_except_specs, compparms,
4588 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
4589 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
4590 cp_has_mutable_p, at_least_as_qualified_p,
4591 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
4592 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
4593 * except.c (nothrow_libfn_p): Likewise.
4594 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
4596 * pt.c (comp_template_parms, template_parameter_pack_p,
4597 any_type_dependent_arguments_p, any_value_dependent_elements_p,
4598 any_dependent_template_arguments_p): Likewise.
4599 * repo.c (repo_export_class_p): Likewise.
4600 * semantics.c (anon_aggr_type_p): Likewise.
4601 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
4602 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
4603 varargs_function_p, member_p, is_dummy_object, pod_type_p,
4604 zero_init_p, special_function_p): Likewise.
4605 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
4606 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
4607 compparms, invalid_nonstatic_memfn_p,
4608 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
4609 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
4610 cp_has_mutable_p, lvalue_or_else): Likewise.
4612 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
4614 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
4615 * cp-objcp-common.c (cp_tree_size): Ditto.
4616 * tree.c (cp_walk_subtrees): Ditto
4617 * cp-tree.def (TINST_LEVEL): Go away.
4618 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
4619 move together with other non-tree structs.
4620 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
4621 (union lang_tree_node): Eliminate tinst_level field.
4622 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
4623 (current_instantiation, outermost_tinst_level): Return
4624 a "struct tinst_level *".
4626 * error.c (print_instantiation_partial_context): Change second
4627 parameter to a "struct tinst_level *". Replace accessor macros
4629 (print_instantiation_full_context): Likewise.
4630 * lex.c (in_main_input_context): Likewise.
4632 * pt.c (struct pending_templates): New.
4633 (pending_templates, last_pending_template): Use it as a type.
4634 (current_tinst_level): Change typo to "struct tinst_level *"
4635 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
4636 (add_pending_template): Construct a "struct pending_template".
4637 Replace TINST_LEVEL accessor macros with field access.
4638 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
4639 (pop_tinst_level): Likewise.
4640 (instantiate_pending_templates): Likewise. Factor common code used
4641 when an instantiation has been done.
4642 (outermost_tinst_level): Replace tree_last with loop.
4643 (current_instantiation): Return a "struct tinst_level *".
4645 2007-08-24 Ollie Wild <aaw@google.com>
4647 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
4648 * name-lookup.h (cp_binding_level): Remove vtables member.
4650 2007-08-24 Richard Guenther <rguenther@suse.de>
4652 * tree.c (cp_cannot_inline_tree_fn): Remove.
4653 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
4654 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
4657 2007-08-24 Jakub Jelinek <jakub@redhat.com>
4660 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
4661 error_mark_node right away if build_expr_type_conversion
4665 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
4666 is error_mark_node rather than NULL_TREE.
4667 * pt.c (check_explicit_specialization): Likewise.
4670 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
4671 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
4673 2007-08-22 Jason Merrill <jason@redhat.com>
4676 * pt.c (outermost_tinst_level): New function.
4677 * lex.c (in_main_input_context): New function.
4678 * cp-tree.h: Declare it.
4679 * decl2.c (constrain_class_visibility): Use it to avoid warning
4680 about uses of the anonymous namespace in the main input file.
4682 2007-08-21 Jakub Jelinek <jakub@redhat.com>
4684 * init.c (build_new_1): Use get_target_expr instead of save_expr.
4686 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
4689 * class.c (finish_struct_1): Warn when a class has virtual
4690 functions and accessible non-virtual destructor.
4692 2007-08-20 Richard Guenther <rguenther@suse.de>
4696 * call.c (build_new_method_call): Convert initializer to
4698 * init.c (build_aggr_init): Do not fiddle with types.
4699 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
4700 * except.c (build_throw): Do not drop qualifiers for the
4702 * typeck.c (get_member_function_from_ptrfunc): Do not
4703 fiddle with types, instead convert.
4704 (build_ptrmemfunc1): Convert to the target type for
4706 (gfc_trans_allocate): Convert result to target type.
4707 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
4708 pointer-to-member structures shall have alias set zero as well.
4710 2007-08-20 Richard Guenther <rguenther@suse.de>
4712 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
4714 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
4715 (nonstatic_local_decl_p): Likewise.
4716 * tree.c (cp_auto_var_in_fn_p): Remove.
4717 * decl.c (nonstatic_local_decl_p): Remove.
4719 2007-08-20 Richard Guenther <rguenther@suse.de>
4721 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
4723 * tree.h (cp_walk_tree): New define to walk_tree_1 with
4724 cp_walk_subtrees lh parameter.
4725 (cp_walk_tree_without_duplicates): New define to
4726 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
4727 * tree.c (count_trees): Call
4728 cp_walk_tree_without_duplicates.
4729 (verify_stmt_tree): Call cp_walk_tree.
4730 (break_out_target_exprs): Likewise.
4731 (WALK_SUBTREE): Likewise.
4732 * cp-gimplify.c (cp_genericize): Likewise.
4733 * cp-pt.c (find_parameter_packs_r): Likewise.
4734 (uses_parameter_packs): Likewise.
4735 (make_pack_expansion): Likewise.
4736 (check_for_bare_parameter_packs): Likewise.
4737 (for_each_template_parm): Likewise.
4738 * decl.c (check_default_argument): Call
4739 cp_walk_tree_without_duplicates.
4740 * except.c (build_throw): Likewise.
4741 * decl2.c (type_visibility): Likewise.
4742 * semantics.c (expand_or_defer_fn): Likewise.
4743 (finalize_nrv): Call cp_walk_tree.
4745 2007-08-20 Jakub Jelinek <jakub@redhat.com>
4748 * init.c (build_new_1): Rename placement_var variable to placement_expr.
4749 Initialize it with save_expr rather than get_temp_regvar.
4751 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
4754 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
4757 2007-08-17 Ollie Wild <aaw@google.com>
4760 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
4761 declarations into appropriate slots for comparison. Fix type
4764 2007-08-17 Paolo Carlini <pcarlini@suse.de>
4767 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
4768 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
4770 2007-08-17 Paolo Carlini <pcarlini@suse.de>
4773 * parser.c (cp_parser_class_head): Improve error message.
4775 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
4777 * pt.c (instantiate_decl): Set input_location
4778 for the function end.
4780 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4782 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
4784 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
4785 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
4786 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
4787 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
4788 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
4789 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
4790 * typeck.c (cp_type_quals): Likewise.
4791 * typeck2.c (cxx_incomplete_type_diagnostic,
4792 cxx_incomplete_type_error): Likewise.
4794 2007-08-16 Paolo Carlini <pcarlini@suse.de>
4797 * pt.c (tsubst_friend_function): When check_classfn
4798 returns error_mark_node likewise return it.
4800 2007-08-15 Jakub Jelinek <jakub@redhat.com>
4803 * typeck.c (check_return_expr): Don't NRV optimize vars in
4805 * decl.c (finish_function): Comment fix.
4807 2007-08-15 Paolo Carlini <pcarlini@suse.de>
4810 * pt.c (push_template_decl_real): Depending on TYPE_P
4811 use either TYPE_CONTEXT or DECL_CONTEXT.
4813 2007-08-14 Mark Mitchell <mark@codesourcery.com>
4815 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
4816 constructors and destructors return this.
4818 2007-08-14 Paolo Carlini <pcarlini@suse.de>
4821 * decl2.c (check_classfn): Return error_mark_node in case of error;
4822 in that case, do not call add_method.
4823 * decl.c (start_decl): Deal with check_classfn returning
4825 (grokfndecl): Likewise.
4826 * pt.c (tsubst_friend_function): Likewise.
4828 2007-08-14 Andrew Pinski <pinskia@gmail.com>
4831 * typeck.c (build_binary_op): Disallow vector float types with
4832 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
4834 2007-08-11 Ian Lance Taylor <iant@google.com>
4836 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
4838 * cp-tree.h (cxx_get_alias_set): Update declaration.
4840 2007-08-10 Ollie Wild <aaw@google.com>
4842 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
4844 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
4846 (unqualified_namespace_lookup): Fix ambiguous_decl call.
4847 (lookup_using_namespace): Fix ambiguous_decl call.
4848 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
4850 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4852 * call.c (name_as_c_string): Use CONST_CAST.
4853 * decl.c (build_decl): Likewise.
4854 * parser.c (cp_parser_string_literal): Likewise.
4856 2007-08-10 Paolo Carlini <pcarlini@suse.de>
4859 * error.c (dump_expr): Consistently use the *_cxx_*
4860 variants of the pretty-print functions.
4862 2007-08-10 Paolo Carlini <pcarlini@suse.de>
4865 * decl.c (check_special_function_return_type): Just error
4866 on return type specified for conversion operator.
4868 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
4870 * typeck2.c (readonly_error): Handle general expressions.
4871 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
4873 2007-08-06 Dan Hipschman <dsh@google.com>
4875 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
4876 access function name.
4878 2007-08-04 Alfred Minarik <a.minarik@aon.at>
4881 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
4882 * g++spec.c (lang_specific_driver): Check them.
4884 2007-08-06 Paolo Carlini <pcarlini@suse.de>
4887 * pt.c (inline_needs_template_parms): Fix comment; change return type
4890 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
4893 2007-03-26 Dirk Mueller <dmueller@suse.de>
4895 * parser.c (cp_parser_member_declaration): Pedwarn
4896 about stray semicolons after member declarations.
4898 2007-08-02 Lee Millward <lee.millward@gmail.com>
4903 * parser.c (cp_parser_asm_definition): Detect and discard asm
4904 statements with invalid inputs or outputs.
4905 (cp_parser_asm_operand_list): Return error mark node if any
4906 of the operands are invalid. Adjust documentation.
4908 2007-08-02 Nick Clifton <nickc@redhat.com>
4910 * typeck.c: Change copyright header to refer to version 3 of the
4911 GNU General Public License and to point readers at the COPYING3
4912 file and the FSF's license web page.
4913 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
4914 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
4915 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
4916 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
4917 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
4918 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
4919 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
4920 name-lookup.h, parser.c: Likewise.
4922 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4925 * call.c (magic_varargs_p): Honor the "type generic" attribute.
4927 2007-07-30 Paolo Carlini <pcarlini@suse.de>
4930 * semantics.c (finish_label_stmt): Reject the __label__
4931 extension outside function scopes.
4933 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4935 * parser.c (eof_token): Un-constify.
4936 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
4937 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
4940 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
4942 * pt.c, tree.c, typeck2.c: Fix comment typos.
4944 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
4945 Mark Mitchell <mark@codesourcery.com>
4948 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
4949 hidden due to friend declarations in local classes.
4951 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
4953 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
4954 * cp-tree.def (DECLTYPE_TYPE): New.
4955 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
4956 (dump_type_prefix): Ditto.
4957 (dump_type_suffix): Ditto.
4958 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
4959 * mangle.c (write_type): Handle DECLTYPE_TYPE.
4960 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
4962 (DECLTYPE_TYPE_EXPR): New.
4963 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
4964 (finish_declared_type): Declare.
4965 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
4966 DECLTYPE_TYPE nodes.
4967 (pp_cxx_type_id): Ditto.
4968 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
4969 (tsubst): Substitute into a DECLTYPE_TYPE node.
4970 (tsubst_copy): Ditto.
4971 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
4973 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
4974 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
4975 structural equality (because we can't hash the expressions).
4976 (finish_declared_type): New.
4977 * lex.c (reswords): Add "decltype" keyword.
4978 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
4979 (cp_parser_postfix_expression): Add member_access_only_p to
4980 restrict postfix expression to member access expressions.
4981 (cp_parser_unary_expression): Update call to
4982 cp_parser_postfix_expression to reflect new parameter.
4983 (cp_parser_declared_type): New.
4984 (cp_parser_simple_type_specifier): Parse decltype types.
4986 2007-07-27 Mark Mitchell <mark@codesourcery.com>
4989 * call.c (convert_for_arg_passing): Only widen bitfields to their
4990 declared types if necessary.
4992 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4994 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
4997 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4999 * decl.c (typename_hash, typename_compare): Constify.
5000 * mangle.c (hash_type, compare_type): Likewise.
5001 * pt.c (eq_local_specializations, hash_local_specialization):
5003 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
5004 list_hash): Likewise.
5005 * typeck2.c (pat_compare): Likewise.
5007 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
5009 * method.c (implicitly_declare_fn): Increase alignment if member
5010 function pointer format requires it.
5012 2007-07-24 Paolo Carlini <pcarlini@suse.de>
5015 * typeck.c (check_return_expr): Do not pass a null argument
5018 2007-07-24 Paolo Carlini <pcarlini@suse.de>
5021 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
5024 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
5027 * typeck.c (convert_arguments): Only use default args if we have
5031 * typeck.c (structural_comptypes): No need to check
5032 resolve_typename_type return value here.
5033 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
5034 * pt.c (resolve_typename_type): Follow typename typedefs. Return
5035 original type rather than error_mark_node in case of failure.
5036 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
5037 resolve_typename_type result check.
5038 (cp_parser_direct_declarator, cp_parser_head,
5039 cp_parser_constructor_declarator_p): Likewise.
5041 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
5043 * pt.c (template_parms_variadic_p): Remove.
5044 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
5046 2007-07-12 Jakub Jelinek <jakub@redhat.com>
5049 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
5050 argument to dump_aggr_init_expr_args instead of false.
5052 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
5054 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
5055 canonical types; otherwise, fall back to structural type
5056 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
5057 internal compiler error if the canonical types are wrong.
5059 2007-07-11 Paolo Carlini <pcarlini@suse.de>
5062 * parser.c (cp_parser_make_indirect_declarator): When the
5063 the code argument is ERROR_MARK return cp_error_declarator.
5065 2007-07-09 Geoffrey Keating <geoffk@apple.com>
5068 * decl.c (cxx_init_decl_processing): Don't set
5069 force_align_functions_log.
5070 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
5071 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
5072 FUNCTION_DECL, return its alignment.
5074 2007-07-09 Richard Guenther <rguenther@suse.de>
5076 * decl.c (start_preparsed_function): Do not promote return type.
5078 2007-07-08 Paolo Carlini <pcarlini@suse.de>
5081 * pt.c (unify): Never pass error_mark_node to template_decl_level.
5083 2007-07-07 Mark Mitchell <mark@codesourcery.com>
5086 * pt.c (resolve_overloaded_unification): Robustify. Return a
5088 (type_unification_real): Adjust accordingly.
5090 2007-07-06 Richard Guenther <rguenther@suse.de>
5092 * init.c (build_new_1): Use the correct pointer type.
5093 * typeck2.c (build_m_component_ref): Likewise.
5095 2007-07-05 Mark Mitchell <mark@codesourcery.com>
5098 * init.c (build_zero_init): Always build an initializer for
5100 * typeck2.c (build_functional_cast): Use build_zero_init.
5103 * init.c (build_new_1): Always pass the allocation function to
5104 build_op_delete_call.
5105 * call.c (build_op_delete_call): Handle operator delete with a
5106 variable-argument list. Do not issue an error when no matching
5107 deallocation function is available for a new operator.
5110 * cp-tree.h (any_value_dependent_elements_p): Declare it.
5111 * decl.c (value_dependent_init_p): New function.
5112 (cp_finish_decl): Use it.
5113 * pt.c (value_dependent_expression_p): Use
5114 any_value_dependent_elements_p.
5115 * parser.c (cp_parser_primary_expression): Add comment about
5116 treating dependent qualified names as integral
5117 constant-expressions.
5119 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
5121 * decl.c (build_ptrmemfunc_type): Always use structural equality
5122 tests when comparing pointer-to-member-function types, because the
5123 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
5126 2007-07-03 Mark Mitchell <mark@codesourcery.com>
5128 * init.c (build_new): Tweak comment.
5130 2007-06-29 Dave Brolley <brolley@redhat.com>
5133 * parser.c (cp_parser_new_type_id): Don't reduce a named array
5134 type to its base type and number of elements here.
5135 * init.c (build_new): Call complete_type_or_else to ensure that the
5136 type is complete and to issue a diagnostic if it is not.
5137 (build_new_1): Don't call complete_type_or_else here.
5139 2007-07-03 Richard Guenther <rguenther@suse.de>
5142 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
5145 2007-07-02 Simon Baldwin <simonb@google.com>
5147 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
5148 for inner-style nested forward declarations that don't declare
5151 2007-07-02 Jakub Jelinek <jakub@redhat.com>
5154 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
5155 DECL_P in not a variable and appears more than once error messages.
5157 2007-07-01 Ollie Wild <aaw@google.com>
5159 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
5160 (select_decl): Remove function.
5161 (unqualified_namespace_lookup): Populate binding by calling
5162 ambiguous_decl. Remove select_decl call.
5163 (lookup_qualified_name): Remove select_decl call.
5164 * decl.c (lookup_and_check_tag): Check for ambiguous references.
5165 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
5166 generation when name lookup is ambiguous.
5168 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
5171 * init.c (build_new_1): Use structural equality on the copy of the
5174 2007-06-28 Geoffrey Keating <geoffk@apple.com>
5176 * decl2.c (determine_visibility): Implement
5177 flag_visibility_ms_compat effect on type info.
5178 * decl.c (cxx_init_decl_processing): Implement
5179 global effect of flag_visibility_ms_compat.
5181 2007-06-28 Geoffrey Keating <geoffk@apple.com>
5183 * decl2.c (start_objects): Mark constructor-running function
5186 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
5189 * decl.c (grokdeclarator): Reset friendp for member functions declared
5190 friend of their own class.
5192 2007-06-23 Mark Mitchell <mark@codesourcery.com>
5194 * decl2.c (determine_visibility): Don't look for dllexport here.
5195 (determine_visibility_from_class): Tidy.
5197 2007-06-18 Simon Baldwin <simonb@google.com>
5200 * parser.c (cp_parser_single_declaration): Added check for storage
5201 class other than sc_none in parsed declaration, and a flag to indicate
5202 if the call is part of an explicit template specialization parse.
5203 * (cp_parser_explicit_specialization): Specialization check flag added
5204 to call to cp_parser_single_declaration(), set true.
5205 * (cp_parser_template_declaration_after_export): Specialization check
5206 flag added to call to cp_parser_single_declaration(), set false.
5207 * pt.c (check_explicit_specialization): Added code to copy visiblity
5208 and linkage from the templated function to the explicit specialization.
5210 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
5212 * typeck.c (build_binary_op): For templates build the
5213 expression in pieces to avoid the assert in build2_stat.
5214 (get_member_function_from_ptrfunc):
5215 Change over to using POINTER_PLUS_EXPR and convert
5216 the second operand to sizetype.
5217 * typeck2.c (build_m_component_ref): Likewise.
5218 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
5219 instead of PLUS_EXPR for pointers.
5220 (build_new_1): Likewise.
5221 (build_vec_delete_1): Likewise.
5222 (build_vec_delete): Likewise.
5223 * class.c (build_base_path): Likewise.
5224 (build_base_path): Likewise.
5225 (convert_to_base_statically): Likewise.
5226 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
5227 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
5228 instead of PLUS_EXPR.
5229 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
5230 instead of PLUS_EXPR for pointers.
5231 * call.c (build_special_member_call): Likewise.
5232 * rtti.c (build_headof): Likewise.
5233 Use sizetype instead of ptrdiff_type_node.
5234 (tinfo_base_init): Create a POINTER_PLUS_EXPR
5235 instead of PLUS_EXPR for pointers.
5236 * except.c (expand_start_catch_block): Do a
5237 NEGATIVE and then a POINTER_PLUS_EXPR instead
5239 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
5240 PLUS_EXPR on pointer types over to use
5241 POINTER_PLUS_EXPR and remove the conversion
5242 to the pointer types.
5243 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
5244 adding to a pointer type. Use size_int instead of
5245 ssize_int. Convert the index to sizetype before
5246 adding it to the pointer.
5248 2007-06-15 Mark Mitchell <mark@codesourcery.com>
5250 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
5251 (DECL_ANON_UNION_VAR_P): New macro.
5252 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
5253 than DECL_VAR_MARKED_P, to keep track of which variables we have
5255 * decl.c (redeclaration_error_message): Complain about redeclaring
5256 anonymous union members at namespace scope.
5257 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
5259 2007-06-14 Geoff Keating <geoffk@apple.com>
5261 * decl2.c (determine_visibility): Ensure that functions with
5262 hidden types as parameters are hidden.
5265 * decl2.c (determine_visibility): Remove duplicate code for
5268 2007-06-12 Ian Lance Taylor <iant@google.com>
5271 * init.c (avoid_placement_new_aliasing): New static function.
5272 (build_new_1): Call it.
5274 2007-06-11 Rafael Ávila de Espíndola <espindola@google.com>
5276 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
5277 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
5279 2007-06-08 Jakub Jelinek <jakub@redhat.com>
5282 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
5283 on init, the non-decl cond operand and increment value.
5285 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
5288 * decl.c (check_initializer): Report an error when a brace enclosed
5289 initializer is used for a non-aggregate type in C++98.
5290 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
5292 (grokdeclarator): Likewise.
5293 (move_fn_p): Likewise.
5294 * typeck.c (check_return_expr): Likewise.
5295 * call.c (reference_binding): Likewise.
5296 * error.c (cp_cpp_error): Likewise.
5297 * pt.c (check_default_tmpl_args): Likewise.
5299 * lex.c (init_reswords): Likewise.
5300 * parser.c (p_parser_primary_expression): Likewise.
5301 (TOKEN_PRECEDENCE): Likewise.
5302 (cp_parser_init_declarator): Likewise.
5303 (cp_parser_ptr_operator): Likewise.
5304 (cp_parser_parameter_declaration): Likewise.
5305 (cp_parser_enclosed_template_argument_list): Likewise.
5306 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
5307 (cp_parser_next_token_ends_template_argument_p): Likewise.
5309 2007-06-04 Simon Baldwin <simonb@google.com>
5311 * decl.c (grokdeclarator): Readability change. Moved case labels
5312 into direct switch statement scope.
5314 2007-06-04 Paolo Carlini <pcarlini@suse.de>
5316 * call.c (convert_like_real): Remove pointless code.
5318 2007-05-31 Mark Mitchell <mark@codesourcery.com>
5320 * decl.c (get_atexit_fn_ptr_type): New function.
5321 (get_atexit_node): Use it.
5322 (start_cleanup_fn): Likewise.
5323 (register_dtor_fn): Use the object's destructor, instead of a
5324 separate cleanup function, where possible.
5325 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
5326 (atexit_fn_ptr_type_node): New macro.
5327 * decl2.c (build_cleanup): Use build_address.
5329 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
5331 * typeck.c (build_binary_op): Include types in error.
5333 2007-05-31 Jakub Jelinek <jakub@redhat.com>
5336 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
5337 needs runtime initialization.
5339 2007-05-31 Paolo Carlini <pcarlini@suse.de>
5342 * semantics.c (finish_trait_expr): Complete the types.
5344 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
5345 Douglas Gregor <doug.gregor@gmail.com>
5346 Pedro Lamarao <pedro.lamarao@mndfck.org>
5347 Howard Hinnant <howard.hinnant@gmail.com>
5351 * typeck.c (comptypes): Don't consider rvalue and lvalue
5352 reference types to be equivalent.
5353 (check_return_expr): Move from certain lvalues when returning
5355 * decl.c (grokdeclarator): Implement reference collapsing.
5356 (copy_fn_p): Don't consider constructors taking rvalue references
5357 to be copy constructors.
5359 * call.c (conversion): New "rvaluedness_matches_p" member.
5360 (convert_class_to_reference): Require reference type as first
5361 parameter instead of base type.
5362 (reference_binding): Add logic to handle rvalue references.
5363 (implicit_conversion): Update inaccurate comment.
5364 (convert_like_real): Disable creation of temporaries that are
5365 impossible to initialize for types with move constructors.
5366 (build_over_call): Elide move constructors when possible.
5367 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
5368 (maybe_handle_ref_bind): Return conversion instead of type node.
5369 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
5370 determine preferred conversion sequences.
5371 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
5372 (LOOKUP_PREFER_RVALUE): New.
5373 (DECL_MOVE_CONSTRUCTOR_P): New.
5374 (struct cp_declarator): Add "reference" member for reference
5375 types, with new "rvalue_ref" flag.
5376 (cp_build_reference_type): Declare.
5377 (move_fn_p): Declare.
5378 * error.c (dump_type_prefix): Format rvalue reference types
5379 correctly in error messages.
5380 * except.c (build_throw): Move from certain lvalues when
5382 * mangle.c (write_type): Mangle rvalue references differently
5383 than regular references.
5384 * parser.c (make_reference_declarator): Add boolean parameter for
5386 (cp_parser_make_indirect_declarator): New.
5387 (cp_parser_new_declarator_opt): Call
5388 cp_parser_make_indirect_declarator.
5389 (cp_parser_conversion_declarator_opt): Ditto.
5390 (cp_parser_declarator): Ditto.
5391 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
5393 * pt.c (tsubst): Implement reference collapsing.
5394 (maybe_adjust_types_for_deduction): Implement special template
5395 parameter deduction rule for rvalue references.
5396 (type_unification_real): Update calls to
5397 maybe_adjust_types_for_deduction.
5398 (try_one_overload): Ditto.
5399 (unify_pack_expansion): Ditto.
5400 * tree.c (lvalue_p_1): Handle rvalue reference types.
5401 (cp_build_reference_type): New.
5403 2007-05-30 Jakub Jelinek <jakub@redhat.com>
5406 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
5407 variables that need runtime initialization.
5409 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
5412 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
5413 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
5414 case POSTDECREMENT_EXPR>): Return the error_mark_node
5415 if either the real or imaginary parts would an
5418 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
5419 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5422 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
5423 token is a closing brace, false if there are no tokens left.
5424 (cp_parser_namespace_alias_definition): Only consume the next token if
5425 it is a closing brace.
5427 * parser.c (cp_parser_class_specifier): Likewise.
5429 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
5431 * semantics.c (finish_member_declaration): Fix a typo in the
5434 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
5446 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
5447 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
5448 * pt.c (check_for_bare_parameter_packs): Return bool indicated
5449 whether everything was okay. Fix indentation.
5450 (push_template_decl_real): Check for bare parameter packs in
5451 function parameters; where errors occur, mark the parameter types
5452 with ERROR_MARK_NODEs to avert ICEs.
5453 (coerce_template_parameter_pack): New.
5454 (coerce_template_parms): Moved parameter pack coercion into
5455 coerce_template_parameter_pack, and permit it anywhere in the
5456 template parameter list (not just at the end). Parameter and
5457 argument indices can vary (somewhat) separately now, so add
5458 PARM_IDX and ARG_IDX.
5459 (fn_type_unification): Don't set an argument pack as incomplete if
5460 no argument pack was deduced.
5461 (type_unification_real): If a type parameter is a parameter pack
5462 and has not otherwise been deduced, it will be deduced to an empty
5464 (more_specialized_fn): Use the actual lengths of the argument
5465 lists when comparing against expansions.
5466 * semantics.c (finish_member_declaration): If a field's type has
5467 bare parameter packs, error and set its type to ERROR_MARK_NODE.
5469 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
5472 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
5474 2007-05-22 Ollie Wild <aaw@google.com>
5476 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
5477 (unqualified_namespace_lookup): Adds check for hidden types.
5479 2007-05-22 Ollie Wild <aaw@google.com>
5481 * decl.c (duplicate_decls): Verify namespace names are unique.
5483 2007-05-21 Mark Mitchell <mark@codesourcery.com>
5485 * decl.c (cxx_maybe_build_cleanup): Handle
5486 __attribute__((cleanup)).
5488 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5490 * cvt.c (cp_convert_and_check): Don't check warnings if the
5493 2007-05-18 Geoffrey Keating <geoffk@apple.com>
5495 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
5497 2007-05-14 Paolo Carlini <pcarlini@suse.de>
5500 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
5501 type only if is a class type (5.2.8/4).
5503 2007-05-14 Rafael Ávila de Espíndola <espindola@google.com>
5505 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
5506 * decl.c (grokdeclarator): Use unsigned_type_for instead of
5507 c_common_unsigned_type.
5509 2007-05-11 Silvius Rus <rus@google.com>
5511 * typeck.c (build_indirect_ref): Add call to
5512 strict_aliasing_warning.
5513 (build_reinterpret_cast_1): Condition call to
5514 strict_aliasing_warning.
5516 2007-05-11 Jan Hubicka <jh@suse.cz>
5518 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
5519 * decl2.c (start_objects): ctors and dtors are no longer public.
5520 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
5522 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
5524 * typeck.c (build_unary_op): Remove code that used to
5525 handle non lvalue increments/decrements.
5527 2007-05-07 Mike Stump <mrs@apple.com>
5529 * parser.c (check_empty_body): Add.
5530 (cp_parser_iteration_statement): Add call to check_empty_body.
5532 2007-05-05 Geoffrey Keating <geoffk@apple.com>
5535 * mangle.c (write_mangled_name): Mangle static variable names.
5536 (write_unqualified_name): Use local-source-name for
5537 namespace-scope static variables.
5539 2007-05-04 Dirk Mueller <dmueller@suse.de>
5541 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
5544 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
5547 * decl2.c (constrain_class_visibility):
5548 Use strip_pointer_or_array_types instead of strip_array_types.
5550 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
5553 * decl.c (reshape_init_r): Don't reshape the first element if it
5554 is a pointer to member function.
5556 2007-04-27 Simon Baldwin <simonb@google.com>
5558 * decl.c (grokparms): Changed message format from %qD to %qE.
5560 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
5562 * error.c (maybe_warn_variadic_templates): Variadic templates are
5563 now in C++0x, so only warn about them in C++98 mode.
5565 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
5568 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
5569 integeral types from vectors types.
5571 2007-04-26 Jakub Jelinek <jakub@redhat.com>
5574 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
5575 for type dependent OMP_CLAUSE_DECLs.
5577 2007-04-24 Mark Mitchell <mark@codesourcery.com>
5580 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
5581 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
5582 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
5583 * init.c (build_zero_init): Adjust, as
5584 COMPLEX_TYPE is now a SCALAR_TYPE.
5585 * typeck2.c (digest_init): Allow brace-enclosed initializers for
5586 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
5588 2007-04-25 Paolo Carlini <pcarlini@suse.de>
5590 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
5591 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
5592 (trait_expr_value): Adjust.
5594 2007-04-23 Simon Baldwin <simonb@google.com>
5596 * decl.c (grokparms): Added new error for duplicate function
5597 parameters names in function prototypes, to match gcc behavior.
5599 2007-04-23 Jan Hubicka <jh@suse.cz>
5601 * decl2.c (finish_objects): Do not call target constructor/destructor
5604 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
5606 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
5607 instead of checking GIMPLE_STMT_P in chain_next.
5609 2007-04-17 Mark Mitchell <mark@codesourcery.com>
5612 * call.c (convert_for_arg_passing): Convert bitfields to their
5615 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
5618 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
5620 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
5623 * decl2.c (constrain_class_visibility):
5624 Do not warn about the use of anonymous namespace in the main input file.
5626 2007-04-15 Mark Mitchell <mark@codesourcery.com>
5628 * cp-tree.h (current_template_parms): Fix typo in comment.
5630 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
5632 * cp-tree.h, error.c: Fix comment typos.
5634 2007-04-13 Jason Merrill <jason@redhat.com>
5637 * call.c (reference_binding): Add c_cast_p parm. If true,
5638 add quals to TO as needed to make it reference-compatible.
5640 2007-04-11 Jan Hubicka <jh@suse.cz>
5642 * class.c (convert_to_base_statically): Fold produced tree; verify
5643 that we are not processing template_decl.
5645 2007-04-09 Mark Mitchell <mark@codesourcery.com>
5648 * class.c (build_base_path): Ensure that the converted pointer has
5649 the same cv-qualification as the input.
5651 2007-04-09 Paolo Carlini <pcarlini@suse.de>
5653 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
5655 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
5657 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
5659 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
5660 * tree.c (cp_add_pending_fn_decls): Remove.
5661 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
5663 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
5665 Revert change removing staticp.
5667 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
5669 * cp-objcp-common.c (cxx_staticp): Remove.
5670 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
5671 * cp-tree.h (cxx_staticp):
5673 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
5675 * class.c (check_for_override): Don't remove dllmport attribute
5678 2007-04-03 Jakub Jelinek <jakub@redhat.com>
5681 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
5682 type issue error and return early.
5684 2007-03-30 Jason Merrill <jason@redhat.com>
5687 * typeck.c (cp_type_readonly): New fn.
5688 * cp-tree.h: Declare it.
5689 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
5690 (cp_finish_decl): Not here.
5692 2007-03-31 Richard Guenther <rguenther@suse.de>
5694 * optimize.c (maybe_clone_body): Replace splay-tree usage by
5697 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
5702 * parser.c (declarator_can_be_parameter_pack): New.
5703 (cp_parser_template_parameter): Only parse the `...' if the
5704 declarator can be a parameter pack.
5705 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
5707 * pt.c (find_parameter_packs_r): Look into the bounds on integer
5708 types (they could be used as array bounds).
5709 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
5710 (tsubst_pack_expansion): Handle failure to expand parameter
5713 2007-03-30 Paolo Carlini <pcarlini@suse.de>
5716 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
5717 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
5718 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
5719 (CLASS_TYPE_NON_UNION_P): Add.
5720 (struct lang_type_class): Add has_complex_dflt.
5721 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
5722 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
5723 * cp-tree.def: Add TRAIT_EXPR.
5724 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
5725 * lex.c (struct resword): Add __has_nothrow_assign,
5726 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
5727 __has_trivial_constructor, __has_trivial_copy,
5728 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
5729 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
5730 __is_pod, __is_polymorphic, __is_union.
5731 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
5732 (cp_parser_trait_expr): New.
5733 * semantics.c (finish_trait_expr, trait_expr_value
5734 classtype_has_nothrow_copy_or_assign_p): New.
5735 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
5737 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
5738 * class.c (check_bases, check_field_decl, check_bases_and_members):
5739 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
5740 * pt.c (uses_template_parms, tsubst_copy_and_build,
5741 value_dependent_expression_p, type_dependent_expression_p): Deal with
5743 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
5745 2007-03-29 Richard Guenther <rguenther@suse.de>
5747 * tree.c (cp_walk_subtrees): Do not set input_location.
5749 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
5752 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
5755 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5757 * parser.c (struct cp_parser): Update comment for
5758 greater_than_is_operator_p.
5759 (cp_parser_primary_expression): In C++0x mode, a cast operator can
5760 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
5761 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
5762 !GREATER_THAN_IS_OPERATOR_P.
5763 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
5764 `>>' operators that will become two `>' tokens in C++0x.
5765 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
5766 mode, allowing it to terminate default arguments.
5767 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
5768 `>>' like two consecutive `>' tokens.
5769 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
5770 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
5771 ends a template argument.
5773 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5775 * decl.c (redeclaration_error_message): Complain when redeclaring
5776 a friend function with default template arguments (C++0x mode only).
5777 * cp-tree.h (check_default_tmpl_args): Declare.
5778 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
5779 template arguments in function templates. Add support for checking
5780 the default template arguments of friend templates.
5781 (push_template_decl_real): Fix call to check_default_tmpl_args.
5782 (type_unification_real): If a template parameter has not been
5783 deduced but provides a default template argument, substitute into
5784 that default template argument.
5785 * parser.c (cp_parser_init_declarator): When declaring (but not
5786 defining!) a function template in C++0x mode, check for default
5789 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5792 * decl.c (grokdeclarator): Deal with cv-qualified function type
5793 typedefs in the same way for member and non-member functions.
5795 2007-03-26 Dirk Mueller <dmueller@suse.de>
5797 * parser.c (cp_parser_member_declaration): Pedwarn
5798 about stray semicolons after member declarations.
5800 2007-03-26 Paolo Carlini <pcarlini@suse.de>
5803 * pt.c (instantiate_decl): Set in_system_header.
5805 2007-03-22 Mark Mitchell <mark@codesourcery.com>
5807 * cp-tree.h (current_tempalte_parms): Improve documentation.
5808 * pt.c (current_template_args): Likewise.
5811 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
5812 not consume tokens when failing.
5814 2007-03-22 Jim Wilson <wilson@specifix.com>
5815 Mark Mitchell <mark@codesourcery.com>
5818 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
5819 consistent with FROM.
5821 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5823 * error.c (dump_expr): Handle dependent names that designate types.
5824 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
5826 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
5828 * cp-tree.def, parser.c, pt.c: Fix comment typos.
5830 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5832 * cvt.c (cp_convert_and_check) : Define.
5833 * cp-tree.h (cp_convert_and_check): Declare.
5834 * call.c (convert_conversion_warnings): Rename to
5835 conversion_null_warnings. The warning for floating-point to
5836 integer is handled by convert_and_check in convert_like_real.
5837 (convert_like_real): convert_conversion_warnings was renamed as
5838 conversion_null_warnings.
5839 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
5840 overflow and changes of value during conversion.
5842 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5845 * parser.c (cp_parser_statement): If 'namespace' is found, this
5846 only can be a namespace alias definition, so parse it now.
5847 (cp_parser_namespace_alias_definition): if we find an open brace
5848 instead of '=', then this is actually a misplaced namespace
5851 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5854 * decl.c (cxx_init_decl_processing): Move command-line options
5855 processing to c-opts.c.
5857 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
5859 * ptree.c (cxx_print_type): Use formatting markup for integers
5860 when printing template parameter index/level/orig level.
5861 (cxx_print_xnode): Ditto.
5862 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
5863 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
5864 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
5866 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
5867 rather than a HOST_WIDE_INT.
5868 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
5869 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
5871 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
5872 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
5873 IN_BASE_INITIALIZER bool bitfields.
5874 (struct cp_declarator): Make KIND a 4-bit field. Make
5875 PARAMETER_PACK_P a bool bitfield just after KIND.
5876 * pt.c (uses_parameter_packs): Destroy the pointer set.
5877 (make_pack_expansion): Ditto.
5878 (check_for_bare_parameter_packs): Ditto.
5879 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
5881 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
5884 * call.c (convert_default_arg): Instead of copying the node,
5887 2007-03-15 Dirk Mueller <dmueller@suse.de>
5890 * call.c (convert_conversion_warnings): New..
5891 (convert_like_real): .. factored out from here.
5892 (convert_conversion_warnings): Add warning about
5893 false being converted to NULL in argument passing.
5895 2007-03-14 Dirk Mueller <dmueller@suse.de>
5897 * semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
5898 (finish_do_body): Warn about empty body in do/while statement.
5900 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5902 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
5904 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5907 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
5910 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
5912 * repo.c (init_repo): Initialize random_seed saved options.
5913 (finish_repo): Adjust.
5915 2007-03-13 Mark Mitchell <mark@codesourcery.com>
5918 * Make-lang.in (doc/g++.1): Use $< to specify the location from
5921 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
5923 * decl.c (compute_array_index_type): New warning flag warn_vla.
5925 2007-03-12 Mark Mitchell <mark@codesourcery.com>
5928 * call.c (convert_default_arg): Copy non-constant arguments.
5930 2007-03-11 Mark Mitchell <mark@codesourcery.com>
5933 * parser.c (cp_parser_postfix_expression): Disallow compound
5934 literals in constant expressions.
5937 * semantics.c (finish_typeof): Use unlowered_expr_type.
5939 2007-03-10 Mark Mitchell <mark@codesourcery.com>
5942 * cp-tree.h (unlowered_expr_type): New function.
5943 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
5944 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
5945 (unlowered_expr_type): New function.
5946 (build_unary_op): Disallow predecrements of bool bitfields.
5947 * call.c (build_conditional_expr): Use unlowered_expr_type.
5948 * pt.c (type_unification_real): Likewise.
5950 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
5953 * typeck.c (check_return_expr): Check for bare parameter packs.
5954 (comptypes): Compare template parameter packs and
5955 type pack expansions.
5956 * decl.c (grokdeclarator): Deal with the declaration of function
5958 (grokparms): Verify that the (optional) function parameter pack is
5959 at the end of the parameter list.
5960 (xref_basetypes): Handle pack expansions in the base class.
5961 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
5962 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
5963 (NONTYPE_ARGUMENT_PACK): New.
5964 (TYPE_PACK_EXPANSION): New.
5965 (EXPR_PACK_EXPANSION): New.
5966 (ARGUMENT_PACK_SELECT): New.
5967 * cp-objcp-common.c (cp_tree_size): Compute size of
5968 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
5969 ARGUMENT_PACK_SELECT.
5970 * error.c (dump_template_argument): Print template argument packs.
5971 (dump_template_argument_list): Ditto.
5972 (dump_template_parameter): Dump `...' for template type parameter
5974 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
5975 (dump_parameters): Print function parameter packs.
5976 (dump_template_parms): Print template argument packs.
5977 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
5978 (maybe_warn_variadic_templates): New.
5979 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
5980 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
5981 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
5983 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
5984 (write_template_arg): Write argument packs as separate arguments.
5985 * cp-tree.h (struct template_parm_index_s): Add flag that
5986 indicates that the template parameter is actually a parameter
5988 (struct tree_argument_pack_select): New.
5989 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
5990 (union lang_tree_node): Add argument_pack_select.
5991 (FUNCTION_PARAMETER_PACK_P): New.
5992 (PACK_EXPANSION_P): New.
5993 (PACK_EXPANSION_PATTERN): New.
5994 (SET_PACK_EXPANSION_PATTERN): New.
5995 (PACK_EXPANSION_PARAMETER_PACKS): New.
5996 (ARGUMENT_PACK_P): New.
5997 (ARGUMENT_PACK_ARGS): New.
5998 (SET_ARGUMENT_PACK_ARGS): New.
5999 (ARGUMENT_PACK_INCOMPLETE_P): New.
6000 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
6001 (TEMPLATE_PARM_PARAMETER_PACK): New.
6002 (TEMPLATE_TYPE_PARAMETER_PACK): New.
6003 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
6004 (ARGUMENT_PACK_SELECT_INDEX): New.
6005 (ARGUMENT_PACK_SELECT_ARG): New.
6006 (struct cp_declarator): Add parameter_pack_p flag.
6007 (maybe_warn_variadic_templates): Declare.
6008 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
6009 indicate a template parameter pack.
6010 (uses_parameter_packs): Declare.
6011 (template_parameter_pack_p): Declare.
6012 (template_parms_variadic_p): Declare.
6013 (make_pack_expansion): Declare.
6014 (check_for_bare_parameter_packs): Declare.
6015 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
6016 sizeof... expressions.
6017 (pp_cxx_expression): Print pack expansions and non-type argument
6019 (pp_cxx_exception_specification): Print pack expansions.
6020 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
6021 (pp_cxx_ctor_initializer): Print pack expansions.
6022 (pp_cxx_type_id): Print pack expansions.
6023 (pp_cxx_template_argument_list): Print argument packs.
6024 (pp_cxx_template_parameter): Print ellipsis for template parameter
6026 * pt.c (comp_template_parms): Compare template parameter packs.
6027 (template_parameter_pack_p): New.
6028 (template_parms_variadic_p): New.
6029 (template_args_variadic_p): New.
6030 (make_ith_pack_parameter_name): New.
6031 (struct find_parameter_pack_data): New.
6032 (find_parameter_packs_r): New.
6033 (uses_parameter_packs): New.
6034 (make_pack_expansion): New.
6035 (check_for_bare_parameter_packs): New.
6036 (expand_template_argument_pack): New.
6037 (reduce_template_parm_level): Propagate parameter pack flag.
6038 (process_template_parm): Add is_parameter_pack parameter to state
6039 when the parameter is actually a parameter pack. Create template
6040 parameter packs when is_parameter_pack is true.
6041 (current_template_args): The argument for a template parameter
6042 pack is an argument pack containing a single pack expansion.
6043 (process_partial_specialization): When checking that non-type
6044 argument expressions do not involve template parameters, loop over
6045 the arguments in argument packs separately.
6046 (push_template_decl_real): Check that the type of the declaration
6047 does not have any bare parameter packs. Check that primary
6048 templates have no more than one parameter pack, and that it comes
6049 at the end of the template parameter list.
6050 (convert_template_argument): Handle coercions for pack expansion
6051 expressions by coercing the pattern then rebuilding the expansion.
6052 (coerce_template_parms): When coercing the arguments for a
6053 variadic template, pack "extra" arguments into an argument pack.
6054 (coerce_template_template_parms): Cannot coerce between parameter
6055 packs and non-pack parameters.
6056 (template_args_equal): Compare PACK_EXPANSION_P expressions.
6057 (comp_template_args): Expand all template arguments packs before
6058 comparing template argument lists.
6059 (mangle_class_name_for_template): Make argument packs as separate
6061 (for_each_template_parm_r): No need to handle BASELINK.
6062 (instantiate_class_template): Handle pack expansions in the base
6064 (tsubst_pack_expansion): New.
6065 (tsubst_template_args): Handle substitutions of argument packs and
6066 pack expansion into template argument lists.
6067 (tsubst_decl): Expand function parameter packs into separate
6068 function parameters.
6069 (tsubst_arg_types): Expand a type pack expansion into separate
6071 (tsubst_exception_specification): Handle pack expansions in
6072 exception specifiers.
6073 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
6074 replacing a template parameter with its argument. If we encounter
6075 a substitution for an argument pack, just return the parameter
6077 (tsubst_copy): sizeof(X...) returns the number of elements in
6078 parameter pack X. See through ARGUMENT_PACK_SELECT when the
6079 PARM_DECL is a parameter pack.
6080 (tsubst_expr): Expression pack expansions and argument packs
6081 cannot show up here; they will all be handled through function
6082 calls, sizeof, and template argument lists.
6083 (tsubst_copy_and_build): sizeof(X...) returns the number of
6084 elements in parameter pack X. Handle pack expansions in TREE_LIST
6085 and CONSTRUCTOR nodes.
6086 (fn_type_unification): Handle "incomplete" explicit template
6087 argument lists that specify some of the arguments for a template
6089 (type_unification_real): Unify arguments against pack expansions.
6090 (template_parm_level_and_index): New, helper function.
6091 (unify_pack_expansion): New.
6092 (unify): Unify argument packs on an argument-by-argument basis,
6093 handling variadic argument packs as well.
6094 (more_specialized_fn): Handle unification of function parameter
6095 packs. All things being equal, prefer non-variadic function
6096 templates to variadic function templates.
6097 (more_specialized_class): Prefer the variadic class template
6098 partial specialization that binds fewer arguments to a parameter
6100 (regenerate_decl_from_template): Expand function parameter packs
6101 into separate parameters.
6102 (instantiate_decl): Ditto.
6103 (tsubst_initializer_list): Handle pack expansions for base-class
6105 (dependent_type_p_r): Determine dependent types in argument packs
6106 and pack expansions.
6107 (value_dependent_expression_p): Determine value-dependence of
6108 non-type argument packs.
6109 (dependent_template_arg_p): Handle argument packs.
6110 * semantics.c (finish_cond): Check for bare parameter packs.
6111 (finish_expr_stmt): Ditto.
6112 (finish_for_expr): Ditto.
6113 (finish_switch_cond): Ditto.
6114 (finish_mem_initializers): Ditto.
6115 * name-lookup.c (arg_assoc_type): Handle pack expansions and
6117 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
6118 * parser.c (make_declarator): Declarator is not an expansion.
6119 (make_pointer_declarator): Transfer parameter pack flag to outer
6121 (make_reference_declarator): Ditto.
6122 (make_ptrmem_declarator): Ditto.
6123 (make_call_declarator): Ditto.
6124 (make_array_declarator): Ditto.
6125 (cp_parser_postfix_expression): Allow pack expansion expressions
6126 in the argument list for a call expression.
6127 (cp_parser_parenthesized_expression_list): Add new parameter
6128 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
6129 into separate arguments."
6130 (cp_parser_new_placement): Allow pack expansion expressions.
6131 (cp_parser_new_initializer): Ditto.
6132 (cp_parser_mem_initializer_list): Allow ellipsis to create a
6133 base-class initializer expansion.
6134 (cp_parser_mem_initializer): Ditto.
6135 (cp_parser_template_parameter_list): Keep track of whether the
6136 template parameter is a template parameter pack.
6137 (cp_parser_template_parameter): Parse the ellipsis to indicate a
6138 template parameter pack.
6139 (cp_parser_type_parameter): Ditto.
6140 (cp_parser_template_argument_list): Parse the ellipsis to indicate
6142 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
6143 this declarator is a parameter pack.
6144 (cp_parser_parameter_declaration): The ellipsis does not end the
6145 parameter declaration, because it might be a parameter pack. Parse
6146 the ellipsis to indicate a parameter pack.
6147 (cp_parser_initializer): Allow pack expansions.
6148 (cp_parser_initializer_list): Allow ellipsis to create an
6149 initializer expansion.
6150 (cp_parser_base_clause): Allow ellipsis to create a base specifier
6152 (cp_parser_type_id_list): Allow ellipsis to create an exception
6153 specifier expansion.
6154 (cp_parser_attribute_list): Don't allow pack expansions.
6155 (cp_parser_functional_cast): Allow pack expansions.
6156 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
6157 compute the length of a parameter pack.
6158 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
6159 end a template argument.
6160 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
6161 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
6164 2007-03-09 Dirk Mueller <dmueller@suse.de>
6166 * call.c (build_new_op): Call warn_logical_operator.
6168 2007-03-08 Volker Reichelt <v.reichelt@netcologne.de>
6171 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
6174 * pt.c (any_template_arguments_need_structural_equality_p):
6177 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
6179 * decl.c (grokdeclarator): Disable warnings for anonymous
6182 2007-03-05 Volker Reichelt <v.reichelt@netcologne.de>
6184 * typeck2.c (readonly_error): Always emit a hard error.
6185 Remove last argument.
6186 * cp-tree.h (readonly_error): Adjust prototype.
6187 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
6188 * typeck.c (build_unary_op): Likewise.
6189 (build_modify_expr): Likewise.
6191 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
6194 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
6196 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6199 * parser.c (struct cp_parser): New IN_IF_STMT.
6200 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
6201 returning if parsing the body of an 'if' statement or issuing an
6202 error and continuing.
6203 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
6205 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
6207 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
6210 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
6213 2007-03-02 Geoffrey Keating <geoffk@apple.com>
6215 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
6216 Objective-C++. Don't exit early if -shared-libgcc needs to be
6219 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6221 * typeck.c (common_base_type): Delete unused function.
6223 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
6225 * Make-lang.in: Add dummy lang.install-pdf target.
6227 2007-03-01 Simon Baldwin <simonb@google.com>
6230 * decl.c (check_tag_decl): Added new warning for typedef ignored
6231 when it precedes an otherwise valid non-typedef declaration.
6233 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
6235 * typeck.c (build_function_call): Store converted arguments
6236 in a stack-allocated array instead of building a list.
6237 (convert_arguments): Store arguments in the array passed in as an
6238 argument, and return the actual number of arguments.
6239 * call.c (build_call): Delete, and replace with...
6240 (build_call_n, build_call_a): New.
6241 (build_op_delete_call): Rewrite to avoid constructing argument lists.
6242 (build_over_call): Store converted arguments in a stack-allocated
6243 array instead of building a list.
6244 (build_cxx_call): Pass arguments in an array instead of as a list.
6245 (build_java_interface_fn_ref): Rewrite to avoid constructing
6247 * tree.h: Update declarations to reflect above changes.
6248 * method.c (use_thunk): Use a stack-allocated array to hold
6249 the arguments instead of a list.
6250 * rtti.c (throw_bad_cast): Update call to cxx_call.
6251 (throw_bad_typeid): Likewise.
6252 (build_dynamic_cast_1): Likewise.
6253 * init.c (build_builtin_delete_call): Use build_call_n.
6254 * decl.c (expand_static_init): Likewise.
6255 * except.c (cp_protect_cleanup_actions): Likewise.
6256 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
6257 (gimplify_must_not_throw_expr): Likewise.
6258 (cxx_omp_apply_fn): Use build_call_a.
6260 2007-02-26 Mark Mitchell <mark@codesourcery.com>
6262 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
6263 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
6265 2007-02-25 Mark Mitchell <mark@codesourcery.com>
6267 * cp-tree.h (static_ctors): Remove.
6268 * cp-tree.h (static_dtors): Likewise.
6269 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
6270 refactoring of tree_map hierarchy.
6271 (decl_shadowed_for_var_insert): Likewise.
6272 * semantics.c (expand_body): Use c_expand_body.
6273 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
6274 * decl2.c (static_ctors): Remove.
6275 (static_dtors): Likewise.
6276 (generate_ctor_or_dtor_function): Pass NULL_TREE to
6277 objc_generate_static_init_call. Do not call static_[cd]tors.
6278 (generate_ctor_and_dtor_functions_for_priority): Do not check for
6280 (cp_write_global_declarations): Likewise.
6282 2007-02-23 Richard Guenther <rguenther@suse.de>
6284 * class.c (note_name_declared_in_class): Make declaration
6285 changes meaning a pedwarn.
6287 2007-02-22 Michael Matz <matz@suse.de>
6290 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
6291 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
6292 dump_function_decl): Guard emitting outer scopes by new flag.
6293 * cp-lang.c (cxx_dwarf_name): New function.
6294 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
6295 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
6297 (push_template_decl_real, lookup_template_class): Remove calls
6300 2007-02-19 Mark Mitchell <mark@codesourcery.com>
6302 * call.c (build_new_method_call): Ensure that explicit calls of
6303 destructors have type "void".
6305 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6307 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
6308 and -Walways-true with -Waddress.
6309 * cvt.c (convert_to_void): Replace unconditional warning with
6312 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
6314 * decl.c, tree.c: Fix comment typos.
6316 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
6319 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
6320 statement expression if we had an error mark node.
6322 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
6323 Brooks Moses <brooks.moses@codesourcery.com>
6324 Lee Millward <lee.millward@codesourcery.com>
6326 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
6327 Change class to tcc_vl_exp.
6329 * call.c (build_call): Use build_call_list instead
6331 (build_over_call): Likewise.
6332 (build_new_method_call): Use build_min_non_dep_call_list
6333 instead of build_min_non_dep.
6335 * error.c (dump_call_expr_args): New function.
6336 (dump_aggr_init_expr_args): New function.
6337 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
6338 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
6340 * cvt.c (convert_to_void): Use build_call_array instead
6341 of build3; use new AGGR_INIT_EXPR accessor macros.
6343 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
6344 instead of TREE_CODE_LENGTH.
6346 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
6347 AGGR_INIT_EXPR accessor macros.
6349 * cp-gimplify.c (cp_gimplify_init_expr): Use
6350 AGGR_INIT_EXPR_SLOT to set the slot operand.
6352 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
6353 (AGGR_INIT_EXPR_SLOT): New macro.
6354 (AGGR_INIT_EXPR_ARG): New macro.
6355 (aggr_init_expr_nargs): New macro.
6356 (AGGR_INIT_EXPR_ARGP): New macro.
6357 (aggr_init_expr_arg_iterator): New.
6358 (init_aggr_init_expr_arg_iterator): New.
6359 (next_aggr_init_expr_arg): New.
6360 (first_aggr_init_expr_arg): New.
6361 (more_aggr_init_expr_args_p): New.
6362 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
6363 (stabilize_aggr_init): New declaration.
6364 (build_min_non_dep_call_list): Likewise.
6366 * tree.c (process_aggr_init_operands): New function.
6367 (build_aggr_init_array) New function.
6368 (build_cplus_new): Update to use new CALL_EXPR and
6369 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
6370 build_aggr_init_array.
6371 (build_min_non_dep_call_list) New function.
6372 (build_min_nt): Assert input code parameter is not a variable
6373 length expression class.
6374 (build_min, build_min_non_dep): Likewise.
6375 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
6376 to check for equality instead of recursing. Handle tcc_vl_exp
6378 (stabilize_call): Update to only handle CALL_EXPRs, not
6379 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
6380 (stabilize_aggr_init): New function.
6381 (stabilize_init): Use it.
6383 * cxx-pretty-print.c (pp_cxx_postfix_expression)
6384 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
6385 AGGR_INIT_EXPR accessor macros and argument iterators.
6387 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
6388 build_vl_exp. Iterate through the operands, recursively
6389 processing each one.
6390 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
6391 CALL_EXPR accessor macros.
6392 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
6393 tree code classes. Use TREE_OPERAND_LENGTH instead of
6396 * semantics.c (finish_call_expr): Use build_nt_call_list
6397 instead of build_nt.
6398 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
6399 accessor macros. Use build_call_array to construct the
6400 CALL_EXPR node instead of build3
6402 * decl2.c (build_offset_ref_call_from_tree): Use
6403 build_nt_call_list and build_min_non_dep_call_list instead
6404 of build_min_nt and build_min_non_dep.
6406 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
6407 Use build_nt_call_list instead of build_min_nt.
6409 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6412 * call.c (build_conditional_expr): Improve error message.
6414 2007-02-13 Dirk Mueller <dmueller@suse.de>
6416 * friend.c (do_friend): Annotate warning about friend
6417 declarations in templates with OPT_Wnon_template_friend.
6418 Convert informal message from warning() to inform().
6420 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
6421 Mark Mitchell <mark@codesourcery.com>
6424 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
6425 instantiations for variables.
6427 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6430 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
6431 Check warn_unused_value just once.
6433 2007-02-11 Mark Mitchell <mark@codesourcery.com>
6436 * pt.c (determine_specialization): Use skip_artificial_parms_for.
6437 (fn_type_unificiation): Likewise.
6438 (get_bindings): Likewise.
6440 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
6443 * decl.c (finish_function): Use DECL_REPLACEABLE.
6444 * tree.c (cp_cannot_inline_tree_fn): Likewise.
6446 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
6448 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
6450 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
6452 * decl.c (grokvardecl): Don't error if !have_tls.
6453 (grokdeclarator): Likewise.
6454 * parser.c (cp_parser_omp_threadprivate): Likewise.
6456 2007-02-07 Jakub Jelinek <jakub@redhat.com>
6459 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
6460 parameters and result decls in omp clauses.
6461 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
6464 2007-02-05 Dirk Mueller <dmueller@suse.de>
6467 * parser.c (cp_parser_class_specifier): Always initialize bases.
6469 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
6471 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
6472 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
6473 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
6475 * semantics.c (finish_omp_atomic): Store a whole expression node
6476 in operand 1, and integer_zero_node in operand 0, for dependent
6477 OMP_ATOMIC. Rewrite to make flow easier to understand.
6479 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6481 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
6483 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
6485 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
6486 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
6488 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
6490 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
6491 keyword warning to -Wc++0x-compat.
6493 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6495 * decl.c (grokdeclarator): Update documentation.
6497 2007-02-02 Jakub Jelinek <jakub@redhat.com>
6500 * decl.c (grokdeclarator): If __thread is used together with
6501 a storage class other than extern and static, clear thread_p
6502 after issuing diagnostics and fall through to checking the
6505 2007-01-30 Roger Sayle <roger@eyesopen.com>
6507 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
6508 calculating the size of an array (to avoid recursive errors).
6510 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6513 * typeck.c (build_binary_op): Fix logic for warning. Move warning
6515 * call.c (convert_like_real): Don't warn when converting to
6518 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6520 * decl.c (pop_label): Replace warning with call to
6521 warn_for_unused_label.
6523 2007-01-28 Andrew Pinski <pinskia@gmail.com>
6526 * semantics.c (finish_pseudo_destructor_expr): Check the
6527 destrutor name by calling check_dtor_name.
6529 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
6531 * lex.c (D_CPP0X): Rename.
6533 (reswords): D_CPP0X -> D_CXX0X.
6534 (init_reswords): Ditto.
6535 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
6536 of C++0x keywords as identifiers.
6538 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
6541 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
6544 2007-01-23 Ian Lance Taylor <iant@google.com>
6546 * typeck.c (convert_for_assignment): Only warn about a = b = c
6547 when converting to bool.
6549 2007-01-23 Roger Sayle <roger@eyesopen.com>
6551 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
6553 * typeck.c (ignore_overflows): Remove the remaining uses of
6554 TREE_CONSTANT_OVERFLOW.
6556 2007-01-20 Jan Hubicka <jh@suse.cz>
6558 * decl2.c (start_objects, start_static_storage_duration_function):
6559 Do not make the functions uninlinable.
6561 2007-01-17 Ian Lance Taylor <iant@google.com>
6563 * class.c (add_method): Call VEC_reserve_exact rather than passing
6564 a negative size to VEC_reserve.
6566 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
6569 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
6571 2007-01-10 Mark Mitchell <mark@codesourcery.com>
6574 * decl.c (make_typename_type): If the qualified name is not a
6575 type, issue an error.
6576 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
6579 2007-01-08 Geoffrey Keating <geoffk@apple.com>
6581 * rtti.c: Include target.h.
6582 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
6583 don't emit typeinfo for fundamental types as weak.
6584 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
6586 2007-01-08 Richard Guenther <rguenther@suse.de>
6588 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
6590 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
6592 * call.c (standard_conversion): Pass flag to
6593 vector_types_convertible_p to disallow emission of note.
6594 * typeck.c (convert_for_assignment): Pass flag to
6595 vector_types_convertible_p to allow emission of note.
6596 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
6597 to disallow emission of note.
6599 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6602 * typeck.c (build_binary_op): Call overflow_warning if
6603 TREE_OVERFLOW_P is true for the result and not for any of the
6606 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
6609 * class.c (add_method): Don't wait until template
6610 instantiation time to complain about duplicate methods.
6612 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6615 * semantics.c (finish_unary_op_expr): Warn only if result
6616 overflowed and operands did not.
6618 2007-01-05 Ian Lance Taylor <iant@google.com>
6620 * typeck.c (build_binary_op): Warn about comparing a non-weak
6623 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
6625 * pt.c (tsubst): Propagate the need for structural equality checks
6626 when reducing the level of template parameters.
6628 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
6630 * pt.c: Fix a comment typo.
6632 2007-01-02 Ian Lance Taylor <iant@google.com>
6634 * semantics.c (maybe_convert_cond): Optionally warn when using an
6635 assignment as a condition.
6636 * typeck.c (convert_for_assignment): Optionally warn about
6637 assigning the result of an assignment to a bool.
6639 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
6641 * pt.c (canonical_template_parms): Correct typo in comment.
6643 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
6645 * typeck.c (structural_comptypes): Renamed from "comptypes".
6646 (comptypes): Use canonical type information to perform fast type
6647 comparison. When VERIFY_CANONICAL_TYPES, verify that the
6648 canonical type comparison returns the same results as we would see
6649 from the current, structural check. Support COMPARE_STRUCTURAL
6650 when we need structural checks.
6651 * decl.c (typename_compare): Fix comment.
6652 (build_typename_type): TYPENAME_TYPE nodes require structural
6653 equality checks, because they resolve different based on the
6655 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
6656 require structural equality checks (for now).
6657 (build_ptrmemfunc_type): Build the canonical pointer to member
6659 (compute_array_index_type): Whenever we build a new index type
6660 to represent the size of an array in a template, we need to mark
6661 this index type as requiring structural equality. This goes for
6662 arrays with value-dependent sizes with the current ABI, or all
6664 * tree.c (cplus_array_hash): New.
6665 (struct cplus_array_info): New.
6666 (cplus_array_compare): New.
6667 (cplus_array_htab): New.
6668 (build_cplus_array_type_1): Use a hash table to cache the array
6669 types we build. Build the canonical array type for each array
6671 (cp_build_qualified_type_real): When building a cv-qualified array
6672 type, use the hash table of array types and build canonical array
6674 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
6675 use structural equality (for now).
6676 * cp-tree.h (COMPARE_STRUCTURAL): New.
6677 * pt.c (canonical_template_parms): New.
6678 (canonical_type_parameter): New.
6679 (process_template_parm): Find the canonical type parameter.
6680 (lookup_template_class): When we have named the primary template
6681 type, set the canonical type for our template class to the primary
6682 template type. If any of the template arguments need structural
6683 equality checks, the template class needs structural equality
6685 (tsubst): When reducing the level of a template template
6686 parameter, we require structural equality tests for the resulting
6687 parameter because its template parameters have not had their types
6688 canonicalized. When reducing a template type parameter, find the
6689 canonical reduced type parameter.
6690 (any_template_arguments_need_structural_equality_p): New.