1 2009-01-16 Jason Merrill <jason@redhat.com>
4 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
5 * init.c (build_new): Don't call describable_type unless we
9 * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
12 * search.c (protected_accessible_p): N doesn't vary.
14 2009-01-15 Jason Merrill <jason@redhat.com>
17 * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
18 accept hidden friends.
20 2009-01-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
23 * decl.c (grokdeclarator): Check for a non namespace/class context.
25 2009-01-15 Jason Merrill <jason@redhat.com>
29 * tree.c (lvalue_p_1): Handle BASELINK. A COMPONENT_REF to
30 a function isn't necessarily an lvalue. Take tree, not const_tree.
31 (lvalue_p, real_lvalue_p): Take tree, not const_tree.
32 * typeck.c (lvalue_or_else): Likewise.
33 * cp-tree.h: Adjust prototypes.
35 2009-01-15 Steve Ellcey <sje@cup.hp.com>
38 * pt.c (tsubst): Check for NULL args.
40 2009-01-15 Dodji Seketeli <dodji@redhat.com>
43 * name-lookup.c (pushtag): Don't create members to types that are not
46 2009-01-14 Nick Clifton <nickc@redhat.com>
49 * parser.c: Pass cp_id_kind computed in
50 cp_parser_postfix_dot_deref_expression to
51 cp_parser_primary_expression.
53 2009-01-13 Jakub Jelinek <jakub@redhat.com>
56 * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
57 STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
60 2009-01-12 Jason Merrill <jason@redhat.com>
61 Steve Ellcey <sje@cup.hp.com>
64 * name-lookup.c (lookup_name_real): Keep looking past a hidden
67 2009-01-12 Dodji Seketeli <dodji@redhat.com>
70 * pt.c (parameter_of_template_p): New function.
71 * cp-tree.h: Declare it.
72 * name-lookup.c (binding_to_template_parms_of_scope_p): New
74 (outer_binding): Take template parameters in account when looking for
77 2009-01-12 Jason Merrill <jason@redhat.com>
80 * tree.c (pod_type_p): Return 1 for structs created by the back end.
82 2009-01-12 Jakub Jelinek <jakub@redhat.com>
85 * parser.c (cp_parser_builtin_offsetof): Allow `->' in
86 offsetof member-designator, handle it as `[0].'.
89 * decl.c (start_function): If grokdeclarator hasn't returned
90 FUNCTION_DECL nor error_mark_node, issue diagnostics.
92 2009-01-11 Jakub Jelinek <jakub@redhat.com>
95 * cp-gimplify.c (genericize_if_stmt): Renamed from ...
96 (gimplify_if_stmt): ... this.
97 (cp_gimplify_expr): Don't handle IF_STMT here.
98 (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
100 2009-01-10 Andrew Pinski <pinskia@gmail.com>
103 * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
106 * typeck2.c (build_functional_cast): Check for reference type and NULL
109 2009-01-09 Steve Ellcey <sje@cup.hp.com>
111 * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
113 2009-01-09 Jakub Jelinek <jakub@redhat.com>
116 * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
118 2009-01-09 John F. Carr <jfc@mit.edu>
121 * parser.c (cp_parser_class_specifier): Clear
122 parser->in_unbraced_linkage_specification_p while parsing class
125 2009-01-07 Jakub Jelinek <jakub@redhat.com>
128 * semantics.c (finish_goto_stmt): Convert destination to
131 2009-01-06 Jason Merrill <jason@redhat.com>
138 * pt.c (check_default_tmpl_args): Don't complain about
139 out-of-order parameter packs in the enclosing class
140 or parameter packs after default args.
141 (coerce_template_parms): If we have more than one
142 parameter pack, don't flatten argument packs.
143 (template_args_equal): Handle argument packs.
144 (comp_template_args): Don't flatten argument packs.
145 (check_instantiated_arg): Split out from...
146 (check_instantiated_args): Here. Handle arg packs.
147 (convert_template_argument): Just check that nontype argument
148 packs have the right type.
150 2009-01-05 Dodji Seketeli <dodji@redhat.com>
153 * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
155 2009-01-05 Jason Merrill <jason@redhat.com>
158 * typeck2.c (process_init_constructor_union): Handle union with
161 * mangle.c (write_expression): Remove mangling for zero-operand
165 * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
169 * class.c (defaultable_fn_p): Only operator== can be a copy
172 2009-01-02 Jason Merrill <jason@redhat.com>
175 * typeck2.c (process_init_constructor_union): Handle excess
177 (process_init_constructor_record): Likewise.
180 * typeck2.c (digest_init_r): Don't use process_init_constructor
181 for non-aggregate classes.
183 2008-12-31 Jakub Jelinek <jakub@redhat.com>
186 * parser.c (cp_parser_primary_expression) <case RID_FUNCTION_NAME>:
187 Return error_mark_node if cp_parser_non_integral_constant_expression
191 * semantics.c (finish_decltype_type): Handle TEMPLATE_PARM_INDEX.
193 2008-12-29 Jakub Jelinek <jakub@redhat.com>
196 * parser.c (cp_parser_condition): Use cp_parser_require
197 instead of cp_lexer_consume_token to consume =.
200 * decl.c (start_enum): If enumtype is error_mark_node, exit early.
202 2008-12-28 Jakub Jelinek <jakub@redhat.com>
205 * semantics.c (finish_omp_for): Don't add CLEANUP_POINT_EXPR
206 around volatile iteration var in condition and/or increment
209 2008-12-27 Jakub Jelinek <jakub@redhat.com>
212 * pt.c (tsubst_omp_for_iterator): RECUR on whole init_expr instead of
215 2008-12-21 Jason Merrill <jason@redhat.com>
218 * name-lookup.c (arg_assoc_type): Handle DECLTYPE_TYPE.
220 2008-12-20 Jakub Jelinek <jakub@redhat.com>
221 Manuel López-Ibáñez <manu@gcc.gnu.org>
224 * c-common.c (warn_about_parentheses): Remove ARG_UNUSED from
225 arg_left. Don't warn about X<=Y<=Z if comparison's type isn't
228 2008-12-19 Jakub Jelinek <jakub@redhat.com>
231 * call.c (build_new_method_call): Handle call being COMPOUND_EXPR
234 2008-12-18 Jakub Jelinek <jakub@redhat.com>
237 * init.c (perform_member_init): For value-initialized
238 references call permerror instead of warning and don't emit any
241 2008-12-18 Jason Merrill <jason@redhat.com>
244 * parser.c (cp_parser_token_starts_cast_expression): An EOF
245 can't start a cast-expression.
247 2008-12-17 Jason Merrill <jason@redhat.com>
249 * semantics.c (describable_type): New function.
250 (finish_decltype_type): Use it for dependent exprs.
251 * cp-tree.h: Declare it.
252 * mangle.c (write_type) [DECLTYPE_TYPE]: Set skip_evaluation.
253 (write_expression): If skip_evaluation, use type stubs.
254 * tree.c (cp_tree_equal): Handle PARM_DECLs from different
255 declarations of a function.
256 * init.c (build_new): Do auto deduction if type is describable.
257 * decl.c (cp_finish_decl): Likewise.
258 * parser.c (cp_parser_omp_for_loop): Likewise.
260 2008-12-10 Jason Merrill <jason@redhat.com>
263 * mangle.c (write_builtin_type): Add mangling for decimal floating
264 point and fixed point types.
265 (write_type): Pass FIXED_POINT_TYPE along.
267 2008-12-09 Mark Mitchell <mark@codesourcery.com>
270 * class.c (resolve_address_of_overloaded_function): Check
271 accessibility of member functions unless FLAGS indicates
273 * call.c (standard_conversion): Adjust flags passed to
275 (convert_default_arg): Do not perform access checks.
276 * cp-tree.h (tsubst_flags_t): Add tf_no_access_control.
278 2008-12-08 Steve Ellcey <sje@cup.hp.com>
280 * decl2.c (mark_used): Remove assemble_external call.
282 2008-12-08 Dodji Seketeli <dodji@redhat.com>
285 * name-lookup.c (kept_level_p): Don't forget the case of levels
286 having using directives.
288 2008-12-08 Richard Henderson <rth@redhat.com>
291 * class.c (finish_struct_bits): Use SET_TYPE_MODE.
292 * decl.c (record_unknown_type): Likewise.
293 (start_enum, finish_enum): Likewise.
295 2008-12-05 Jakub Jelinek <jakub@redhat.com>
298 * error.c (dump_expr): Handle BIT_FIELD_REF.
300 2008-12-05 Sebastian Pop <sebastian.pop@amd.com>
303 * Make-lang.in (cc1plus-dummy, cc1plus): Add BACKENDLIBS,
306 2008-12-04 Jason Merrill <jason@redhat.com>
309 * decl.c (grok_special_member_properties): Set TYPE_HAS_COMPLEX_DFLT
311 * class.c (check_bases_and_members): Rather than assuming any
312 user-declared default constructor is complex here.
314 2008-12-04 Richard Guenther <rguenther@suse.de>
317 * typeck.c (get_member_function_from_ptrfunc): Mark the vtbl
318 pointer access with TREE_NO_WARNING.
320 2008-12-03 Jason Merrill <jason@redhat.com>
323 * init.c (build_value_init): Do initial zero-initialization
324 of a class with an implicitly-defined constructor using
325 build_zero_init rather than in build_value_init.
326 (build_value_init_1): Fold into build_value_init.
329 * parser.c (cp_parser_conversion_type_id): Diagnose
330 'operator auto' here.
331 * decl.c (grokdeclarator): Not here.
334 * decl.c (grokdeclarator): Only set DECL_NONCONVERTING_P
335 on explicit constructors.
336 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Propagate
337 CONSTRUCTOR_IS_DIRECT_INIT.
339 2008-12-02 Jason Merrill <jason@redhat.com>
341 PR c++/35782, c++/37860
342 * call.c (build_user_type_conversion_1): Remember
344 (convert_like_real): Likewise.
345 (build_over_call): Don't require the copy constructor
346 for copy-list-initialization.
347 * cp-tree.h (TARGET_EXPR_LIST_INIT_P): New macro.
350 * decl.c (cp_finish_decl): Handle =default and =delete for
353 2008-12-01 Jakub Jelinek <jakub@redhat.com>
356 * parser.c (cp_parser_omp_for_loop): Handle auto.
357 * pt.c (tsubst_omp_for_iterator): Likewise.
359 2008-11-28 Jason Merrill <jason@redhat.com>
362 * init.c (perform_member_init): Fix value-initialization.
363 (build_value_init_1): Add assert to catch cases that will break
365 (build_default_init): Remove.
366 * cp-tree.h: Remove its prototype.
367 * pt.c (tsubst_expr) [DECL_EXPR]: Use build_value_init for
368 value-initialization.
371 * parser.c (cp_parser_class_name): Only call
372 maybe_note_name_used_in_class if we actually found a class name.
374 2008-11-25 Jason Merrill <jason@redhat.com>
377 * decl2.c (check_classfn): Error rather than abort on parameter
380 2008-11-20 Jason Merrill <jason@redhat.com>
383 * parser.c (cp_parser_class_name): Call maybe_note_name_used_in_class.
386 * call.c (build_over_call): Take the address of the function even
388 (build_new_method_call): Remember the type of the called function
391 2008-11-19 Dodji Seketeli <dodji@redhat.com>
394 * pt.c (coerce_template_template_parm): Use the more robust
395 uses_template_parms instead of dependent_type_p.
397 2008-11-19 Dodji Seketeli <dodji@redhat.com>
400 * pt.c (lookup_template_class): Check pointers before dereferencing
402 * error.c (dump_template_decl): Likewise.
404 2008-11-19 Jason Merrill <jason@redhat.com>
407 * decl2.c (grokfield): Pass ATTR_FLAG_TYPE_IN_PLACE for a typedef
408 that names a class for linkage purposes.
411 * parser.c (cp_parser_pseudo_destructor_name): A pseudo-destructor
412 name is not a declaration.
415 * pt.c (instantiate_decl): Don't require a definition of
416 a template that is explicitly instantiated 'extern'.
418 2008-11-18 Jason Merrill <jason@redhat.com>
419 Jakub Jelinek <jakub@redhat.com>
422 * parser.c (cp_parser_type_id): Complain about auto.
423 * decl.c (grokdeclarator): Complain about parameters and
424 conversion functions declared with auto.
426 * call.c (standard_conversion): Use CLASS_TYPE_P instead of
428 * cp-tree.h (TYPE_NON_AGGREGATE_CLASS): Likewise.
430 2008-11-17 Jakub Jelinek <jakub@redhat.com>
433 * init.c (constant_value_1): Handle TREE_LIST init.
435 2008-11-15 Jakub Jelinek <jakub@redhat.com>
438 * typeck.c (cp_build_unary_op): Don't call get_unwidened. Use
439 argtype instead of result_type.
441 2008-11-14 Jason Merrill <jason@redhat.com>
444 * semantics.c (finish_call_expr): Don't repeat arg-dep lookup
445 for a non-dependent call.
448 * call.c (build_aggr_conv): Increment i.
450 2008-11-13 Jason Merrill <jason@redhat.com>
453 * typeck2.c (process_init_constructor_record): Update bitfield
455 (check_narrowing): Update bitfield handling, print source type.
457 2008-11-12 Jakub Jelinek <jakub@redhat.com>
461 2007-05-07 Mike Stump <mrs@apple.com>
462 * parser.c (check_empty_body): Add.
463 (cp_parser_iteration_statement): Add call to check_empty_body.
465 2008-11-12 Jason Merrill <jason@redhat.com>
468 * typeck.c (cp_build_modify_expr): Update bitfield handling.
470 2008-11-12 Jakub Jelinek <jakub@redhat.com>
473 * parser.c (cp_parser_simple_declaration): Don't commit
474 to tentative parse if parse errors were seen.
477 * error.c (dump_expr): Handle COMPLEX_EXPR.
479 2008-11-10 Jakub Jelinek <jakub@redhat.com>
482 * parser.c (cp_parser_enum_specifier): After parsing :,
483 parse definitely. Don't return early if type specifier
486 2008-11-06 David Edelsohn <edelsohn@gnu.org>
489 * g++spec.c (LIBSTDCXX_STATIC): New.
490 (lang_spec_driver): Use LIBSTDCXX_STATIC when not
493 2008-11-05 Fabien Chene <fabien.chene@gmail.com>
496 * cp-tree.h: Fix DECL_NONSTATIC_MEMBER_P to handle member template
499 2008-11-05 Richard Guenther <rguenther@suse.de>
502 * decl.c (start_preparsed_function): Use the correct type for
503 building the RESULT_DECL.
505 2008-10-31 Jakub Jelinek <jakub@redhat.com>
508 * decl.c (grokdeclarator): Diagnose auto function decl without
509 late return type and late return type function decl where type
513 * decl.c (cp_finish_decl): Diagnose type_uses_auto type with
516 2008-10-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
519 * class.c (check_bitfield_decl): Rename min_precision to
520 tree_int_cst_min_precision.
521 * decl.c (finish_enum): Likewise.
523 2008-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
526 * parser.c (cp_parser_token_starts_cast_expression): New.
527 (cp_parser_cast_expression): Peek the next token to decide whether
528 this could be a parenthesized constructor or is definitely an
531 2008-10-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
534 * typeck.c (build_x_binary_op): Update call to
535 warn_about_parentheses.
536 * parser.c (cp_parser_binary_expression): Add note about passing
537 the correct code for unary expressions.
539 2008-10-24 Jakub Jelinek <jakub@redhat.com>
541 * Make-lang.in (check-c++-subtargets): New alias for
542 check-g++-subtargets.
543 (lang_checks_parallelized): Add check-g++.
544 (check_g++_parallelize): New variable.
546 2008-10-21 Richard Guenther <rguenther@suse.de>
548 * semantics.c (simplify_aggr_init_exprs_r): Remove.
549 (expand_or_defer_fn): Do not walk the function body to
550 simplify aggr_init_exprs.
552 2008-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
555 * typeck.c (cp_common_type): New. The same as
556 type_after_usual_arithmetic_conversions but without promotions.
557 (type_after_usual_arithmetic_conversions): Do the promotions and
559 (common_type): Make it behave like the C version of this
560 function. Do not handle pointer types.
561 (common_pointer_type): Move handling of pointer types from
563 (cp_build_binary_op): Use common_pointer_type instead of
564 common_type in call to pointer_diff.
565 Use cp_common_type instead of common_type.
566 * cp-tree.h (common_pointer_type): Declare.
568 2008-10-14 Jakub Jelinek <jakub@redhat.com>
571 * cp-gimplify.c (cp_genericize_r): Only fold_convert COND_EXPR
572 arguments if they don't already have COND_EXPR's type.
574 2008-10-14 Paolo Carlini <paolo.carlini@oracle.com>
577 * pt.c (push_template_decl_real): Check that current_template_parms
579 (process_partial_specialization): Assert current_template_parms not
582 2008-10-13 Doug Evans <dje@google.com>
584 * cp-tree.h (DECL_MAIN_P): Fix parentheses around expression.
586 2008-10-10 Jakub Jelinek <jakub@redhat.com>
589 * cp-gimplify.c (cp_genericize_r): Fix up bitfield operands of
592 2008-10-09 Jakub Jelinek <jakub@redhat.com>
595 * semantics.c (finalize_nrv_r): Clear DECL_INITIAL instead of
596 setting it to error_mark_node.
598 2008-10-07 Steve Ellcey <sje@cup.hp.com>
600 * decl.c (start_cleanup_fn): Declare as inline.
602 2008-10-06 Jason Merrill <jason@redhat.com>
604 PR c++/37376, other mangling issues
605 * mangle.c (write_type): Update TYPE_PACK_EXPANSION mangling.
606 (write_member_name): Break out from...
607 (write_expression): ...here. Handle dependent COMPONENT_REF.
608 (write_template_arg): Wrap an argument pack in 'I'/'E'.
609 (write_builtin_type): Update char16/32_t mangling.
610 (write_nested_name, write_prefix): Don't forget template args
612 * operators.def: Add ARROW_EXPR, update COMPONENT_REF and
615 2008-10-06 Aldy Hernandez <aldyh@redhat.com>
617 * typeck.c (build_x_indirect_ref): Add location argument.
618 (cp_build_binary_op): Pass location to warn_for_div_by_zero.
619 (cp_build_unary_op): Add location argument.
620 (cp_build_modify_expr): Same.
621 * class.c (build_base_path): Pass location to build_indirect_ref.
622 * semantics.c (handle_omp_for_class_iterator): Pass elocus to
625 2008-10-05 Dodji Seketeli <dodji@redhat.com>
628 * cp-gimplify.c (cp_gimplify_expr): For each USING_STMT
629 make sure an IMPORTED_DECL node is added to the BLOCK_VARS list
630 of the innermost containing BLOCK.
632 2008-10-03 Paolo Carlini <paolo.carlini@oracle.com>
635 * error.c (dump_function_decl): Save the exceptions in case of
636 error about incompatible specifications in a specialization.
638 2008-10-01 Andrew Pinski <andrew_pinski@playstation.sony.com>
640 * tree.c (lvalue_p_1): COMPOUND_LITERAL_EXPR is also an lvalue.
642 2008-09-30 H.J. Lu <hongjiu.lu@intel.com>
645 * parser.c (cp_parser_selection_statement): Fix uninitialized
648 2008-09-30 Simon Martin <simartin@users.sourceforge.net>
652 * decl.c (grokdeclarator): Set the type for typedefs to a
653 nested-name-specifier to error_mark_node.
655 2008-09-30 Paolo Bonzini <bonzini@gnu.org>
657 * parser.c (cp_parser_selection_statement): Implement here the
658 -Wempty-body warning for `if' and `else' statements.
659 * semantics.c (finish_if_stmt): Do not call empty_body_warning.
661 2008-09-25 Paolo Carlini <paolo.carlini@oracle.com>
664 * name-lookup.c (maybe_process_template_type_declaration): Check
665 return value of push_template_decl_real for error_mark_node.
667 2008-09-24 Aldy Hernandez <aldyh@redhat.com>
669 * semantics.c (finish_fname): Pass location to fname_decl.
671 2008-09-23 Jakub Jelinek <jakub@redhat.com>
674 * semantics.c (finish_omp_for): If processing_template_decl, just build
675 MODIFY_EXPR for init instead of calling cp_build_modify_expr.
677 2008-09-23 Aldy Hernandez <aldyh@redhat.com>
679 * typeck.c (build_array_ref): Pass location to cp_build_binary_op.
680 (get_member_function_from_ptrfunc): Same.
681 (build_x_binary_op): Same.
682 (build_binary_op): Same.
683 (cp_build_binary_op): New location argument.
684 (pointer_diff): Pass location to cp_build_binary_op.
685 (cp_truthvalue_conversion): Pass location to build_binary_op.
686 (convert_ptrmem): Pass location to cp_build_binary_op.
687 (cp_build_modify_expr): Same.
688 (build_ptrmemfunc): Same.
689 * init.c (expand_cleanup_for_base): Pass location to
690 c_common_truthvalue_conversion.
691 (build_new_1): Pass location to cp_build_binary_op.
692 (build_vec_delete_1): Pass location to *build_binary_op,
693 c_common_truthvalue_conversion.
694 (build_vec_init): Same.
695 (build_delete): Same.
696 * decl.c (compute_array_index_type): Same.
697 * call.c (build_new_op): Same.
698 * rtti.c (build_dynamic_cast_1): Same.
699 * cp-tree.h: Add argument to cp_build_binary_op.
700 * semantics.c (handle_omp_for_class_iterator): Pass location to
701 *build_binary_op, c_common_truthvalue_conversion.
702 * decl2.c (get_guard_cond): Same.
704 2008-09-17 Richard Guenther <rguenther@suse.de>
707 * rtti.c (build_dynamic_cast_1): Convert the COND_EXPR
708 result to the correct type.
710 2008-09-17 H.J. Lu <hongjiu.lu@intel.com>
713 * name-lookup.c (pushdecl_maybe_friend): Don't return the old
714 parameter for duplicate.
716 2008-09-17 Jason Merrill <jason@redhat.com>
719 * name-lookup.c (lookup_type_scope): Look through sk_function_parms.
721 2008-09-17 Jakub Jelinek <jakub@redhat.com>
724 * typeck.c (build_array_ref): Use protected_set_expr_location instead
725 of SET_EXPR_LOCATION when ret might not be an expression.
727 2008-09-17 Jan Hubicka <jh@suse.cz>
730 * cp/decl.c (start_method): Set DECL_NO_INLINE_WARNING_P.
732 2008-09-16 Jakub Jelinek <jakub@redhat.com>
735 * semantics.c (finish_compound_literal): Return error_mark_node if
739 * lex.c (init_reswords): Don't populate ridpointers for D_CONLY
742 2008-09-15 Aldy Hernandez <aldyh@redhat.com>
744 * decl.c (duplicate_decls): Call error_at.
745 (grokfndecl): New location argument. Use location if available.
746 (grokdeclarator): Pass declarator location to grokfndecl.
747 * cp-tree.h (struct cp_declarator): Update comment for id_loc.
748 * decl2.c (check_classfn): Use error_at.
749 * parser.c (cp_parser_init_declarator): Set function_start_locus
751 (cp_parser_member_declaration): Set id_loc for function declarators.
753 2008-09-09 Jan Hubicka <jh@suse.cz>
756 * pt.c (tsubst_decl): Do not copy DECL_STRUCT_FUNCTION pointer.
758 2008-09-09 Jakub Jelinek <jakub@redhat.com>
761 * tree.c (array_type_nelts_top): Add size_one_node instead of
764 2008-09-09 Jason Merrill <jason@redhat.com>
767 * pt.c (tsubst_copy) [PARM_DECL]: Don't abort if the parm has
770 2008-09-09 Jakub Jelinek <jakub@redhat.com>
773 * decl.c (build_enumerator): Handle previous value's DECL_INITIAL
774 being error_operand_p. Don't clear value if it was error_mark_node.
776 2008-09-09 Paolo Bonzini <bonzini@gnu.org>
778 * cp-objcp-common.h (LANG_HOOKS_EXPAND_DECL): Remove.
779 * cp-tree.h: Don't mention DECL_ANON_UNION_ELEMS.
780 * semantics.c (anon_aggr_type_p): Remove.
782 2008-09-06 Jason Merrill <jason@redhat.com>
785 * parser.c (cp_parser_parameter_declaration_list): Process the
786 PARM_DECLs as we go and push them. Return a TREE_LIST.
787 (cp_parser_parameter_declaration_clause): Return a TREE_LIST.
788 (cp_parser_direct_declarator): Create a binding level and
789 suppress deprecated warnings in the parameter list.
790 (make_call_declarator): PARMS is now a tree.
791 * cp-tree.h (struct cp_declarator): Function parms are now a tree.
792 * decl.h (enum deprecated_states, deprecated_state): Move here.
794 (type_is_deprecated): New fn.
795 (grokparms): PARMLIST is a tree now. Warn about parms that
796 use deprecated types.
797 * mangle.c (write_expression): Handle PARM_DECL, CALL_EXPR and
799 * pt.c (tsubst) [DECLTYPE_TYPE]: Set skip_evaluation.
800 (tsubst_copy) [PARM_DECL]: Handle a PARM_DECL used outside of a
802 * name-lookup.c (pushtag): Look through function parameter scopes.
803 (pushdecl_maybe_friend): Don't set DECL_CONTEXT on a PARM_DECL
804 when we're parsing a function declarator.
806 2008-09-05 Douglas Gregor <doug.gregor@gmail.com>
809 * tree.c (cp_build_qualified_type_real): Deal with sharing of
810 TYPE_LANG_SPECIFIC in the canonical types of pointer-to-method
813 2008-09-04 Ian Lance Taylor <iant@google.com>
815 * parser.c (check_no_duplicate_clause): Change code parameter to
816 enum omp_clause_code.
818 2008-09-03 Jakub Jelinek <jakub@redhat.com>
821 * decl.c (cp_finish_decl): Only set
822 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P if decl is VAR_DECL.
825 * cp-tree.h (defer_mark_used_calls, deferred_mark_used_calls): New
827 * decl2.c (mark_used): If defer_mark_used_calls, push decl into
828 deferred_mark_used_calls vector and exit early.
829 * decl.c (defer_mark_used_calls, deferred_mark_used_calls): New
831 (finish_function): Set defer_mark_used_calls for the duration of the
832 function. Call mark_used on any queued decls.
834 2008-09-02 Jason Merrill <jason@redhat.com>
837 * call.c (build_over_call): Make =delete work with SFINAE.
838 * class.c (resolve_address_of_overloaded_function): Likewise.
840 * cp-tree.h (struct lang_decl_flags): Rename threadprivate_p to
841 threadprivate_or_deleted_p.
842 (CP_DECL_THREADPRIVATE_P): Adjust.
843 (DECL_DELETED_FN): Likewise.
844 (SD_UNINITIALIZED, SD_INITIALIZED, SD_DEFAULTED): New macros.
845 (SD_DELETED): New macro.
846 * parser.c (cp_parser_init_declarator): Use them.
847 * decl.c (start_decl): Use them.
849 * decl2.c (mark_used): Give =deleted error even in sizeof.
851 * typeck2.c (check_narrowing): Downgrade narrowing error to
854 2008-09-02 Aldy Hernandez <aldyh@redhat.com>
856 * typeck.c (build_array_ref): Use new location argument.
857 * class.c (build_vtbl_ref_1): Pass location to build_array_ref.
858 * call.c (build_new_op): Same.
859 * decl2.c (grok_array_decl): Same.
860 * cp-tree.h (build_array_ref): Add location argument to prototype.
862 2008-09-01 Aldy Hernandez <aldyh@redhat.com>
864 * typeck.c (build_x_indirect_ref): Add location argument.
865 * class.c (build_base_path): Pass location to build_indirect_ref.
866 * pt.c (tsubst_copy_and_build): Pass location to
867 finish_label_address_expr.
868 * parser.c (cp_parser_unary_expression): Same.
870 2008-08-31 Jason Merrill <jason@redhat.com>
872 Implement late-specified return type using 'auto'.
873 * cp-tree.h (struct cp_declarator): Add late_return_type field to
875 * parser.c (cp_parser_late_return_type_opt): New fn.
876 (cp_parser_direct_declarator): Use it.
877 (make_call_declarator): Put it in the declarator.
878 * decl.c (grokdeclarator): Splice in late-specified return type.
879 * pt.c (splice_late_return_type): New fn.
881 2008-08-29 Michael Meissner <gnu@the-meissners.org>
883 * decl.c (builtin_function_1): Take a bool argument to decide
884 whether to use pushdecl or pushdecl_top_level.
885 (duplicate_decls): Copy function specific target and optimization
886 options on duplicate declarations.
887 (cxx_builtin_function): Update builtin_function_1 call.
888 (cxx_builtin_function_ext_scope): New function, guarantee that the
889 declaration is done at global scope.
891 * cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE): New
892 macro, define builtin function hook for delayed machine specific
895 * cp-tree.h (cxx_builtin_function_ext_scope): Add declaration.
897 2008-08-30 Jason Merrill <jason@redhat.com>
900 * pt.c (dependent_type_p): Don't abort on auto outside of a template.
902 2008-08-29 Jason Merrill <jason@redhat.com>
904 Implement C++0x 'auto' semantics.
905 * decl.c (start_decl_1): Don't complain about auto being incomplete.
906 (cp_finish_decl): Deduce auto.
907 * init.c (build_new): Handle 'new auto'.
908 * typeck2.c (cxx_incomplete_type_diagnostic): Give a different
909 message for auto than for normal template type parms.
910 * pt.c (type_dependent_expression_p): Handle { }.
911 (make_auto): New function.
912 (listify_autos): New function.
913 (do_auto_deduction): New function.
914 (is_auto): New function.
915 (type_uses_auto): New function.
916 * cp-tree.h: Declare them.
917 * parser.c (cp_parser_decl_specifier_seq): In C++0x mode, don't
918 treat auto as a declspec.
919 (cp_parser_simple_type_specifier): It's a type-specifier.
921 2008-08-29 Mark Mitchell <mark@codesourcery.com>
923 * mangle.c (write_type): Add target-specific manglings for
924 non-fundamental types to the substitution table.
927 2008-08-29 Jakub Jelinek <jakub@redhat.com>
931 * name-lookup.c (do_using_directive, cp_emit_debug_info_for_using):
932 Adjust debug_hooks->imported_module_or_decl callers.
934 2008-08-29 Jan Hubicka <jh@suse.cz>
936 * cp-gimplify.c (cp_gimplify_expr): Add PRED_CONTINUE heuristic.
938 2008-08-28 Paolo Carlini <paolo.carlini@oracle.com>
941 * decl.c (reshape_init_r): Check init for error_mark_node.
943 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
946 * semantics.c (maybe_convert_cond): Call verify_sequence_points.
947 (finish_return_stmt): Likewise.
948 (finish_switch_condition): Likewise.
950 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
952 * cp-tree.h: Fix #error directive.
954 2008-08-26 Douglas Gregor <doug.gregor@gmail.com>
956 * typeck.c (type_after_usual_arithmetic_conversions): Don't do the
957 usual arithmetic conversions on scoped enumeration types.
958 (common_type): Ditto.
959 (default_conversion): Don't perform integral promotions on scoped
961 (build_array_ref): Scoped enumeration types can't be used as
963 * decl.c (start_enum): If building a C++0x scoped enumeration,
964 enter its scope. If provided with an underlying type, check that
965 underlying type and set up the enumeration type accordingly.
966 (finish_enum): Only compute an underlying type if the underlying
967 type isn't already fixed, and only convert the enumerator values
968 now if we've just computed the underlying type. Finish the scope
969 of C++0x scoped enumerations.
970 (build_enumerator): For enumerations with a fixed underlying type,
971 check the enumerator values when the enumerator is defined.
972 (lookup_enumerator): New.
973 * call.c (standard_conversion): Don't allow assignment from
974 integers to scoped enumeration types, even with -fpermissive.
975 Don't convert from scoped enumerations to bool or any arithmetic
977 (build_conditional_expr): Don't per the usual arithmetic
978 conversions for scoped enumeration types.
979 (convert_like_real): Check complain to see if we should
981 * error.c (class_key_or_enum_as_string): Print scoped enums.
982 * cp-tree.h (MAYBE_CLASS_TYPE_P): Check CLASS_TYPE_P, not
984 (INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P): New.
985 (SCOPED_ENUM_P): New.
986 (UNSCOPED_ENUM_P): New.
987 (SET_SCOPED_ENUM_P): New.
988 (ENUM_UNDERLYING_TYPE): New.
989 * pt.c (lookup_template_class): Update the instantiation of enum
990 types to deal with C++0x scoped enumerations and underlying
992 * name-lookup.c (begin_scope): Deal with scoped enumeration
994 (lookup_qualified_name): Deal with lookup into enumeration types.
995 * name-lookup.h (enum scope_kind): Add sk_scoped_enum.
996 * parser.c (cp_parser_class_or_namespace_name): Rename to...
997 (cp_parser_qualifying_entity): ... this. Also, in C++0x mode,
998 parse a type-name that can be an enumeration type.
999 (cp_parser_nested_name_specifier_opt): Update with C++0x grammar.
1000 (cp_parser_elaborated_type_specifier): Parse the
1001 optional `struct' or `class' following enum (in C++0x).
1002 (cp_parser_enum_specifier): Parse C++0x scoped enumerations and
1005 2008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1007 * typeck.c: Update all calls to pedwarn.
1010 * error.c: Likewise.
1012 * name-lookup.c: Likewise.
1013 * parser.c: Likewise.
1015 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1018 * parser.c (cp_parser_omp_for_loop): Handle parenthesized
1021 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1023 * parser.c: Update all calls to inform.
1024 * typeck.c: Likewise.
1026 * class.c: Likewise.
1028 * method.c: Likewise.
1029 * friend.c: Likewise.
1030 * typeck2.c: Likewise.
1032 * name-lookup.c: Likewise.
1035 2008-08-19 Jakub Jelinek <jakub@redhat.com>
1038 * error.c (cp_print_error_function): Deal with recursive BLOCK trees.
1040 2008-08-18 Tomas Bily <tbily@suse.cz>
1042 * tree.c (cp_tree_equal): Use CONVERT_EXPR_CODE_P.
1044 2008-08-18 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1046 * typeck.c: Update all callers of permerror.
1048 * class.c: Likewise.
1051 * except.c: Likewise.
1053 * typeck2.c: Likewise.
1055 * semantics.c: Likewise.
1056 * name-lookup.c: Likewise.
1058 * decl2.c: Likewise.
1059 * parser.c: Likewise.
1061 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1064 * pt.c (check_template_shadow): Change to return a bool.
1065 * name-lookup.c (push_class_level_binding): Early return if
1066 check_template_shadow returns false.
1067 * cp-tree.h (check_template_shadow): Adjust declaration.
1069 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1072 * decl.c (grokdeclarator): In case of extern and initializer, return
1073 error_mark_node after the error.
1075 2008-08-13 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1078 * decl.c (grokfndecl): Call check_main_parameters_type only if
1081 2008-08-12 Paolo Carlini <paolo.carlini@oracle.com>
1084 * parser.c (cp_parser_class_head): Early return error_mark_node in
1085 case of global qualification of class name or qualified name that
1086 does not name a class.
1088 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1091 * cvt.c (ocp_convert): Warn for out-of-range conversions to enum.
1093 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1096 * cp-tree.h (struct diagnostic_context, struct diagnostic_info):
1097 Delete forward declarations. Check that toplev.h has not been
1098 included before this file. Include toplev.h and diagnostic.h.
1099 * error.c (cp_cpp_error): Use DK_PEDWARN.
1100 (cxx_incomplete_type_diagnostic): Update declaration.
1101 (cxx_incomplete_type_error): Use DK_ERROR.
1102 * typeck2.c (cxx_incomplete_type_diagnostic): Take a diagnostic_t
1103 as argument. Use emit_diagnostic.
1104 (cxx_incomplete_type_error): Use DK_ERROR.
1105 (add_exception_specifier): Use diagnostic_t instead of custom
1107 * typeck.c (complete_type_or_else): Update call to
1108 cxx_incomplete_type_diagnostic.
1109 * init.c (build_delete): Likewise.
1110 * call.c (diagnostic_fn_t): Remove unused typedef.
1111 (build_temp): Pass a pointer to diagnostic_t.
1112 (convert_like_real): Use emit_diagnostic.
1113 (joust): Check return value of warning before giving informative
1115 * friend.c (do_friend): Check return value of warning
1116 before giving informative note.
1117 * parser.c (cp_parser_template_id): Likewise.
1119 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1122 * class.c (check_bases_and_members): Warn with -Wuninitialized
1125 2008-08-08 Volker Reichelt <v.reichelt@netcologne.de>
1128 * decl.c (xref_basetypes): Check base for MAYBE_CLASS_TYPE_P,
1129 and make sure it is not a union.
1131 2008-08-07 H.J. Lu <hongjiu.lu@intel.com>
1133 * semantics.c (finish_decltype_type): Initialize type.
1135 2008-08-07 Douglas Gregor <doug.gregor@gmail.com>
1137 * semantics.c (finish_decltype_type): Handle calls to function
1138 pointers and references to functions properly.
1140 2008-08-06 Douglas Gregor <doug.gregor@gmail.com>
1143 * parser.c (cp_parser_template_argument): Don't assume that '>>'
1144 following a type-id is an error when in C++0x mode.
1146 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1149 * decl.c (grokdeclarator): Use explicit location with permerror_at.
1151 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1154 * typeck.c (cp_build_binary_op): Move code to c-common.c.
1156 2008-08-05 Jason Merrill <jason@redhat.com>
1159 * decl.c (build_ptrmemfunc_type): Don't require structural
1160 comparison of PMF types.
1161 * tree.c (cp_build_qualified_type_real): Don't clear
1162 a valid TYPE_PTRMEMFUNC_TYPE.
1163 * typeck.c (cp_build_unary_op): Still do build_ptrmemfunc in
1166 2008-08-04 Jason Merrill <jason@redhat.com>
1169 * typeck2.c (check_narrowing): Allow narrowing conversion
1170 from an explicit floating-point constant.
1173 * pt.c (tsubst_decl): Leave DECL_INITIAL set on deleted
1176 2008-08-04 Simon Baldwin <simonb@google.com>
1179 * parser.c (cp_parser_elaborated_type_specifier): Warn only when
1180 the declaration's id is followed by a semicolon.
1182 2008-07-31 Jakub Jelinek <jakub@redhat.com>
1185 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Call
1186 complete_type_or_else even for UNKNOWN_TYPE to get diagnostics.
1188 2008-07-31 Jason Merrill <jason@redhat.com>
1191 * init.c (build_new_1): Don't convert pointer to the data type
1192 until we're actually going to treat it as that type.
1195 * tree.c (build_aggr_init_expr): Split out...
1196 (build_cplus_new): ...from here.
1197 (stabilize_init): Don't mess with AGGR_INIT_EXPR either.
1198 * init.c (build_new_1): new T() means value-initialization,
1199 not default-initialization.
1200 (build_vec_init): Likewise.
1201 (build_value_init_1): Use build_aggr_init_expr.
1203 2008-07-30 Dodji Seketeli <dseketel@redhat.com>
1206 * decl2.c (fix_temporary_vars_context_r): New function.
1207 (one_static_initialization_or_destruction): Make sure temporary
1208 variables part of the initialiser have their DECL_CONTEXT()
1211 2008-07-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1214 * typeck.c (build_binary_op): Encapsulate code into
1217 2008-07-29 Jakub Jelinek <jakub@redhat.com>
1220 * tree.c (cplus_array_hash, build_cplus_array_type_1): Hash on
1221 TYPE_UID instead of pointers.
1223 2008-07-29 Jan Hubicka <jh@suse.cz>
1225 * optimize.c (maybe_clone_body): Remove DECL_INLINE.
1226 * decl.c (duplicate_decls): Likewise.
1227 (grokfndecl): Likewise.
1228 (start_method): Likewise.
1229 * method.c (make_thunk, make_alias_for, implicitly_declare_fn):
1231 * pt.c (register_specialization, regenerate_decl_from_template):
1233 * decl2.c (grokfield): Likewise.
1235 2008-07-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1238 * decl.c (duplicate_decls): Merge USED flags.
1240 2008-07-27 Jason Merrill <jason@redhat.com>
1243 * decl.c (reshape_init_r): Allow C++0x initializer lists.
1245 2008-07-28 Richard Guenther <rguenther@suse.de>
1247 Merge from gimple-tuples-branch.
1249 2008-07-22 Aldy Hernandez <aldyh@redhat.com>
1251 * cp-gimplify.c (gimplify_if_stmt): Set location on newly created
1254 2008-07-18 Jakub Jelinek <jakub@redhat.com>
1256 * decl.c (finish_function): Call gimple_body after cp_genericize.
1258 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
1260 * optimize.c: Include gimple.h instead of tree-gimple.h.
1261 * Make-lang.in (cp-gimplify.o): Depend on tree-iterator.h.
1262 * cp-gimplify.c: Rename tree-gimple.h to gimple.h. Include
1265 2008-07-16 Jakub Jelinek <jakub@redhat.com>
1267 * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE for the clone.
1269 2008-07-14 Jakub Jelinek <jakub@redhat.com>
1271 * cp-gimplify.c (cp_gimplify_expr): Update comment.
1273 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
1275 * cp-tree.h (union lang_tree_node): Rename GENERIC_NEXT to
1277 * cp-gimplify.c (cxx_omp_clause_apply_fn): Rename
1278 GIMPLE_MODIFY_STMT to MODIFY_EXPR.
1279 (cxx_omp_clause_copy_ctor): Same.
1280 (cxx_omp_clause_assign_op): Same.
1282 2008-05-28 Jakub Jelinek <jakub@redhat.com>
1284 * cp-gimplify.c (cp_gimplify_omp_for): Add pre_p argument. Tuplify.
1285 (cp_gimplify_expr): Adjust caller.
1287 2008-05-11 Doug Kwan <dougkwan@google.com>
1289 * init.c (build_vec_delete): Add type conversion for argument
1290 0 of POINTER_PLUS_EXPR.
1292 2008-04-29 Doug Kwan <dougkwan@google.com>
1294 * decl2 (File): Include "gimple.h"
1295 (cp_write_global_declarations): Use gimple_body instead of
1297 * Make-lang.in (cp/decl2.o): Add $(GIMPLE_H)
1299 2008-04-10 Diego Novillo <dnovillo@google.com>
1301 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00913.html
1303 * optimize.c (maybe_clone_body): Re-enable call to
1305 * cp-gimplify.c (cp_gimplify_omp_for): Mark disabled
1306 code with call to gimple_unreachable.
1307 (cp_genericize): Fix handling of clone bodies.
1309 2008-04-04 Diego Novillo <dnovillo@google.com>
1311 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00413.html
1313 * optimize.c (maybe_clone_body): Re-enable.
1315 2008-02-19 Diego Novillo <dnovillo@google.com>
1316 Oleg Ryjkov <olegr@google.com>
1318 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
1320 * cp-gimplify.c (gimplify_for_stmt): Change gimple_seq
1321 argument to gimple_seq *. Update all users.
1322 (gimplify_must_not_throw_expr): Likewise.
1324 2008-02-04 Oleg Ryjkov <olegr@google.com>
1326 * except.c: Include gimple.h
1327 (cp_protect_cleanup_actions): Convert to tuples.
1328 * Make-lang.in (cp/except.o): Add dependency on gimple.h
1330 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
1332 * cp-gimplify.c (gimplify_cp_loop): Call tree_annotate_all_with_locus
1333 instead of annotating each block manually.
1335 2007-10-30 Aldy Hernandez <aldyh@redhat.com>
1337 * cp-gimplify.c (gimplify_cp_loop): Tuplify.
1338 (gimplify_for_stmt): Same.
1339 (gimplify_switch_stmt): Same.
1340 (cp_gimplify_expr): [FOR_STMT]: Do not call gimplify_for_stmt. Return
1342 [WHILE_STMT]: Return GS_OK.
1343 [SWITCH_STMT]: Same.
1344 [CONTINUE_STMT]: Same.
1346 (cp_genericize): Set gimple_body() of cloned functions when needed.
1348 2007-10-29 Aldy Hernandez <aldy@quesejoda.com>
1350 * cp-gimplify.c: Move build_gimple_eh_filter_tree here.
1351 (cp_gimplify_init_expr): Convert to tuples.
1352 (gimplify_must_not_throw_expr): Make function return a
1353 gimplify_status and convert to tuples.
1355 2007-10-18 Aldy Hernandez <aldy@quesejoda.com>
1357 * cp-gimplify.c (genericize_try_block): Enable and do not call
1359 (genericize_catch_block): Same.
1360 (genericize_eh_spec_block): Same.
1361 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
1362 (cp_gimplify_expr): Enable TRY_BLOCK, HANDLER, and EH_SPEC_BLOCK.
1364 2007-10-16 Aldy Hernandez <aldy@quesejoda.com>
1366 * optimize.c (maybe_clone_body): Comment out call to clone_body.
1367 * decl.c (finish_function): Use gimple_body instead of
1369 * cp-tree.h (cp_gimplify_expr): Last 2 arguments are sequences.
1370 * cp-gimplify.c (genericize_try_block): Comment out.
1371 (genericize_catch_block): Same.
1372 (genericize_eh_spec_block): Same.
1373 (gimplify_cp_loop): Comment out calls to gimplify_stmt.
1374 (gimplify_for_stmt): Comment out.
1375 (gimplify_switch_stmt): Comment out call to gimplify_stmt.
1376 (cp_gimplify_omp_for): Same.
1377 (gimplify_must_not_throw_expr): Argument pre_p is a sequence.
1378 Comment out call to gimplify_stmt and append_to_statement_list.
1379 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
1380 (cp_gimplify_init_expr): Arguments pre_p and post_p are sequences.
1381 (cp_gimplify_expr): Same.
1382 Comment out calls to genericize_*_block. Comment out call to
1385 2008-07-27 H.J. Lu <hongjiu.lu@intel.com>
1388 * class.c (type_has_user_provided_default_constructor): Handle
1391 2008-07-27 Paolo Carlini <paolo.carlini@oracle.com>
1393 * decl.c (push_library_fn): Add a parameter for the exceptions that
1394 the function may throw.
1395 (push_void_library_fn, push_throw_library_fn, expand_static_init):
1397 (build_library_fn): Change to static.
1398 * cp-tree.h: Adjust declarations.
1399 * except.c (declare_nothrow_library_fn): New.
1400 (do_get_exception_ptr, do_begin_catch, do_free_exception,
1401 do_allocate_exception): Use the latter, adjust the declarations
1402 (ie, add empty exception-specification), consistently with the
1403 actual implementation in libsupc++.
1405 2008-07-25 Jan Hubicka <jh@suse.cz>
1407 * typeck.c (inline_conversion): Remove.
1408 (cp_build_function_call): Do not use inline_conversion.
1409 * decl.c (duplicate_decls): Do not insist on inline being declared
1411 (start_cleanup_fn): Do not assume that INLINE flags prevent function
1412 from being output. We now remove static functions always.
1413 (finish_function): Do return warning on all static functions.
1414 * call.c (build_over_call): Do not use inline_conversion.
1415 * cp-tree.h (possibly_inlined_p): Declare.
1416 (inline_conversion): Remove.
1417 * pt.c (instantiate_decl): Use possibly_inlined_p predicate.
1418 * decl2.c (cp_write_global_declarations): Likewise.
1419 (mark_used): Likewise.
1420 (possibly_inlined_p): New functions.
1422 2008-07-25 Jason Merrill <jason@redhat.com>
1424 * class.c (type_has_user_provided_default_constructor): Handle
1427 2008-07-23 Jan Hubicka <jh@suse.cz>
1429 * decl.c (duplicate_decls): Update comment and unit-at-a-time.
1430 (grogfndecl): Drop flag_inline_trees code.
1431 * pt.c (instantiate_decl): Drop flag_iline_trees code.
1432 * lex.c (cxx_init): Do not set unit-at-a-time.
1434 2008-07-23 Jason Merrill <jason@redhat.com>
1436 * mangle.c (write_unqualified_name): Avoid infinite recursion when
1437 trying to mangle a decl with no name.
1439 Implement defaulted/deleted functions as per N2346
1440 * cp-tree.h (struct lang_decl_flags): Add defaulted_p bitfield.
1441 (DECL_DELETED_FN): New macro.
1442 (DECL_DEFAULTED_FN): New macro.
1443 * class.c (user_provided_p): New fn.
1444 (defaultable_fn_p): New fn.
1445 (type_has_user_provided_constructor): New fn.
1446 (type_has_user_provided_default_constructor): New fn.
1447 (check_methods): A defaulted fn is still trivial.
1448 (check_bases_and_members): Likewise.
1449 * decl.c (grok_special_member_properties): Likewise.
1450 (duplicate_decls): Complain about redeclaring a function as deleted.
1451 (start_decl): initialized==2 means deleted.
1452 (cp_finish_decl): Handle deleted/defaulted semantics.
1453 * decl2.c (grokfield): Likewise.
1454 (mark_used): Check DECL_DEFAULTED_FN instead of DECL_ARTIFICIAL.
1455 Complain about using a deleted fn.
1456 * init.c (build_value_init_1): Use type_has_user_provided_constructor.
1457 (perform_member_init): Check for a user-provided default constructor
1458 even if TYPE_NEEDS_CONSTRUCTING.
1459 (build_new_1): Likewise.
1460 * call.c (build_over_call): Don't call mark_used twice.
1461 * method.c (implicitly_declare_fn): Set DECL_DEFAULTED_FN.
1462 * search.c (check_final_overrider): Check for deleted mismatch.
1463 * parser.c (cp_parser_init_declarator): Tell start_decl about =delete.
1464 (cp_parser_pure_specifier): Handle =default and =delete.
1466 * error.c (maybe_warn_cpp0x): Suggest -std=gnu++0x as well.
1468 2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1471 * typeck.c: All calls to pedwarn changed.
1472 * decl.c: All calls to pedwarn changed.
1473 * call.c: All calls to pedwarn changed.
1474 * error.c: All calls to pedwarn changed.
1475 * typeck2.c: All calls to pedwarn changed.
1476 * pt.c: All calls to pedwarn changed.
1477 * name-lookup.c: All calls to pedwarn changed.
1478 * parser.c: All calls to pedwarn changed.
1480 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1482 * call.c: Fix comment typos.
1483 * class.c: Likewise.
1484 * cp-tree.h: Likewise.
1485 * cxx-pretty-print.c: Likewise.
1488 * name-lookup.c: Likewise.
1489 * operators.def: Likewise.
1490 * parser.c: Likewise.
1493 * typeck.c: Likewise.
1495 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
1499 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Only check
1500 copy constructors and copy assignment operators proper.
1502 2008-07-21 Rafael Ávila de Espíndola <espindola@google.com>
1504 * parser.c (cp_token): Remove in_system_header.
1505 (eof_token): Remove in_system_header.
1506 (cp_lexer_get_preprocessor_token): Don't set in_system_header.
1507 (cp_lexer_set_source_position_from_token): Don't set in_system_header.
1508 (cp_parser_member_declaration): Use in_system_header_at.
1509 * pt.c (lookup_template_class): Don't set DECL_IN_SYSTEM_HEADER.
1510 (pop_tinst_level): Don't set in_system_header.
1511 (instantiate_class_template): Don't set in_system_header.
1512 (instantiate_decl): Don't set in_system_header.
1513 (instantiate_pending_templates): Don't set in_system_header.
1515 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
1518 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Use
1519 TYPE_NOTHROW_P, not TREE_NOTHROW.
1520 (trait_expr_value): Likewise.
1522 2008-07-18 Dodji Seketeli <dseketel@redhat.com>
1525 * call.c (convert_like_real): Don't take the error code path
1526 when a rvalue or base conversion has the bad_p field set.
1528 2008-07-18 Kris Van Hees <kris.van.hees@oracle.com>
1530 * rtti.c (emit_support_tinfos): Add char16_type_node and
1532 * typeck2.c (digest_init): Support char16_t and char32_t.
1534 2008-07-18 Kavih R. Ghazi <ghazi@caip.rutgers.edu>
1536 * cvt.c (convert_to_void): Avoid C++ keywords.
1537 * decl.c (walk_namespaces_r, wrapup_globals_for_namespace):
1539 * friend.c (is_friend): Likewise.
1540 * init.c (perform_member_init): Likewise.
1541 * mangle.c (write_template_prefix, write_template_template_param):
1543 * name-lookup.c (do_namespace_alias, do_using_directive,
1544 parse_using_directive, ambiguous_decl, arg_assoc): Likewise.
1545 * parser.c (cp_parser_template_id, cp_parser_namespace_definition,
1546 cp_parser_objc_typename, cp_parser_objc_method_keyword_params):
1548 * pt.c (is_specialization_of_friend, lookup_template_class,
1549 push_tinst_level, instantiate_class_template,
1550 tsubst_copy_and_build): Likewise.
1551 * tree.c (add_stmt_to_compound): Likewise.
1552 * typeck.c (finish_class_member_access_expr): Likewise.
1554 2008-07-17 Julian Brown <julian@codesourcery.com>
1555 Mark Mitchell <mark@codesourcery.com>
1557 * decl2.c (determine_visibility): Allow target to override
1558 visibility of class data.
1560 2008-07-17 Paolo Carlini <paolo.carlini@oracle.com>
1563 * semantics.c (trait_expr_value): Update __has_trivial_destructor
1564 semantics to the current WP (N2691).
1566 2008-07-16 Dodji Seketeli <dseketel@redhat.com>
1569 * name-lookup.c (lookup_extern_c_fun_binding_in_all_ns): New function.
1570 (pushdecl_maybe_friend): Check if a redeclaration of extern C function
1571 complies with exception specification constraints.
1573 2008-07-14 Jason Merrill <jason@redhat.com>
1575 * lex.c (init_reswords): Always set D_OBJC.
1577 2008-07-11 Tom Tromey <tromey@redhat.com>
1578 Ian Lance Taylor <iant@google.com>
1580 * lex.c (struct resword, reswords): Don't define.
1581 (D_EXT, D_ASM, D_OBJC, D_CXX0X): Don't define.
1582 (init_reswords): Clarify mask code. Use c_common_reswords rather
1585 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1588 * decl.c (grokdeclarator): Warn about initializing variables
1589 of storage class 'extern' only after the type of the declarator
1590 has been properly computed.
1592 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1595 * cp-tree.h (struct cp_decl_specifier_seq): Add a location field. It
1596 carries the location of the primary type.
1597 * parser.c (cp_parser_check_type_definition): Update documentation.
1598 (cp_parser_check_for_definition_in_return_type,
1599 cp_parser_check_for_invalid_template_id,
1600 cp_parser_set_decl_spec_type,
1601 cp_parser_check_for_definition_in_return_type,
1602 cp_parser_diagnose_invalid_type_name,
1603 cp_parser_new_expression, cp_parser_explicit_instantiation,
1604 cp_parser_type_specifier, cp_parser_simple_type_specifier,
1605 cp_parser_omp_for_loop, cp_parser_pragma): Use location in error
1608 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1612 * semantic.c (qualified_name_lookup_error, finish_id_expression):
1613 Add a location_t parameter so that
1614 error message can have a more accurate location.
1615 * cp-tree.h: Updated prototype
1616 * pt.c (tsubst_qualified_id): Use location in error messages.
1617 * parser.c (cp_parser_postfix_expression,
1618 cp_parser_objc_statement, cp_parser_trait_expr,
1619 cp_parser_token_is_class_key,
1620 cp_parser_uncommitted_to_tentative_parse_p,
1621 cp_parser_check_for_invalid_template_id, cp_parser_is_string_literal,
1622 cp_parser_error, cp_parser_name_lookup_error,
1623 cp_parser_simulate_error, cp_parser_check_decl_spec,
1624 cp_parser_check_decl_spec, cp_parser_non_integral_constant_expression,
1625 cp_parser_diagnose_invalid_type_name,
1626 cp_parser_parse_and_diagnose_invalid_type_name,
1627 cp_parser_require_pragma_eol, cp_parser_make_typename_type,
1628 cp_parser_string_literal, cp_parser_primary_expression,
1629 cp_parser_primary_expression, cp_parser_unqualified_id,
1630 cp_parser_nested_name_specifier_opt, cp_parser_postfix_expression,
1631 cp_parser_postfix_dot_deref_expression, cp_parser_new_expression,
1632 cp_parser_direct_new_declarator, cp_parser_builtin_offsetof,
1633 cp_parser_label_for_labeled_statement, cp_parser_statement_seq_opt,
1634 cp_parser_jump_statement, cp_parser_block_declaration,
1635 cp_parser_simple_declaration, cp_parser_decl_specifier_seq,
1636 cp_parser_function_specifier_opt, cp_parser_decltype,
1637 cp_parser_mem_initializer_list, cp_parser_mem_initializer,
1638 cp_parser_mem_initializer_id, cp_parser_template_parameter,
1639 cp_parser_type_parameter, cp_parser_template_id,
1640 cp_parser_template_name, cp_parser_template_argument): Likewise.
1642 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1645 * pt.c (tsubst_function_type): Remove warning for type qualifiers
1646 on function return type.
1648 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1651 * pt.c (tsubst_function_type): Don't warn for type qualifiers
1652 on function return type in case of system header.
1654 2008-07-09 Raksit Ashok <raksit@google.com>
1656 * parser.c (cp_parser_postfix_expression): New warning based on flag
1657 warn_disallowed_functions.
1659 2008-07-08 Simon Martin <simartin@users.sourceforge.net>
1662 * decl.c (grokdeclarator): Reset storage_class and staticp for friend
1663 functions declared with a storage class qualifier.
1665 2008-07-03 Richard Guenther <rguenther@suse.de>
1668 * typeck.c (cp_build_function_call): Move code to verify
1669 builtin function arguments ...
1670 * call.c (build_cxx_call): ... here.
1672 2008-07-02 Jason Merrill <jason@redhat.com>
1674 * Make-lang.in (cp/typeck2.o): Add $(REAL_H) dependency.
1676 Implement WG21 N2672, Initializer List proposed wording
1677 * cp-tree.h (enum cp_tree_index): Add CPTI_INIT_LIST_TYPE.
1678 (struct lang_type_class): Add has_list_ctor bitfield.
1679 (TYPE_HAS_LIST_CTOR): New macro.
1680 (BRACE_ENCLOSED_INITIALIZER_P): Expect init_list_type_node.
1681 (CONSTRUCTOR_IS_DIRECT_INIT): New macro.
1682 (LOOKUP_NO_NARROWING): New macro.
1683 (LOOKUP_NO_COPY_CTOR_CONVERSION): New macro.
1684 * parser.c (cp_parse_braced_list): Split out from...
1685 (cp_parser_initializer_clause): ...here.
1686 (cp_parser_postfix_expression): Build up CONSTRUCTOR for compound
1688 (cp_lexer_next_token_is_not_keyword): New fn.
1689 (cp_parser_parenthesized_expression_list): Handle { }.
1690 (cp_parser_new_expression, cp_parser_new_initializer): Likewise.
1691 (cp_parser_assignment_expression, cp_parser_condition): Likewise.
1692 (cp_parser_jump_statement, cp_parser_simple_declaration): Likewise.
1693 (cp_parser_mem_initializer, cp_parser_init_declarator): Likewise.
1694 (cp_parser_initializer, cp_parser_functional_cast): Likewise.
1695 (cp_parser_omp_for_loop, cp_parser_cache_group): Likewise.
1696 (cp_parser_save_member_function_body): Likewise.
1697 * call.c (conversion_kind): Add ck_list, ck_aggr.
1698 (struct conversion): Add check_narrowing bitfield, conversion list.
1699 (build_list_conv): New fn.
1700 (build_aggr_conv): New fn.
1701 (implicit_conversion): Call them.
1702 (standard_conversion): Set check_narrowing if appropriate.
1703 (add_function_candidate): Handle LOOKUP_NO_COPY_CTOR_CONVERSION.
1704 (build_user_type_conversion_1): When converting from an init list,
1705 we allow additional conversions except when calling a copy ctor.
1706 (convert_like_real): Calling an explicit ctor for an init list is
1707 ill-formed. Handle ck_list and ck_addr. Check narrowing.
1708 (build_new_method_call): If CONSTRUCTOR_IS_DIRECT_INIT is set and
1709 class doesn't have a list ctor, break the {} into a TREE_LIST.
1710 (compare_ics): ck_list is better than other UDCs.
1711 (set_up_extended_ref_temp): Split out from initialize_reference.
1712 (is_std_init_list): New fn.
1713 (is_list_ctor): New fn.
1714 * decl.c (cxx_init_decl_processing): Create init_list_type_node.
1715 (reshape_init_array_1): Pass it to build_constructor.
1716 (reshape_init_class): Ditto.
1717 (initialize_artificial_var): Pass the appropriate type.
1718 (build_aggr_init_full_exprs): Split out from...
1719 (check_initializer): ...here. Handle new semantics.
1720 (build_init_list_var_init): New subroutine of check_initializer.
1721 (grokdeclarator): Converting constructors can have more than one parm.
1722 (grok_special_member_properties): Set TYPE_HAS_LIST_CTOR.
1723 * init.c (expand_default_init): Only do digest_init for aggregates.
1724 * rtti.c (tinfo_base_init): Pass init_list_type_node to
1725 build_constructor_from_list.
1726 (generic_initializer, ptr_initializer): Ditto.
1727 (ptm_initializer, class_initializer): Ditto.
1728 (get_pseudo_ti_init): Ditto.
1729 * error.c (dump_type): Handle init_list_type_node.
1730 (maybe_warn_cpp0x): New fn.
1731 (maybe_varn_variadic_templates): Call it.
1732 * cvt.c (ocp_convert): Handle conversion from { }.
1733 * tree.c (build_array_of_n_type): New fn.
1734 * typeck2.c (store_init_value): Use init_list_type_node.
1735 (digest_init): Likewise.
1736 (check_narrowing): New fn.
1737 * semantics.c: (finish_compound_literal): Take CONSTRUCTOR instead
1738 of vector of constructor elts. Handle non-aggregate types. Make
1739 constant literals static.
1740 * pt.c: (tsubst_copy_and_build): Adjust.
1741 (unify): Handle { }.
1742 * name-lookup.c (arg_assoc_type): Handle init_list_type_node.
1744 2008-07-01 Daniel Jacobowitz <dan@codesourcery.com>
1746 * typeck.c (comp_ptr_ttypes_real): Use vector_targets_convertible_p.
1747 (comp_ptr_ttypes_const): Likewise.
1749 2008-07-01 Andrew Haley <aph@redhat.com>
1751 * decl.c (finish_constructor_body): Don't set the return value of
1752 the constructor if the constructor is that of a Java type.
1754 2008-06-30 Jakub Jelinek <jakub@redhat.com>
1757 * decl2.c (is_late_template_attribute): If the first attribute
1758 argument is IDENTIFIER_NODE, don't consider it when checking
1759 if arguments are value or type dependent.
1761 2008-06-29 Paolo Carlini <paolo.carlini@oracle.com>
1764 * pt.c (do_type_instantiation): In c++0x mode do not warn for
1767 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1769 * Make-lang.in (cp-warn): Delete $(CXX_COMPAT_WARN).
1771 2008-06-28 Jakub Jelinek <jakub@redhat.com>
1774 * repo.c (repo_emit_p): Put const static data members initialized
1775 by const expr into *.rpo file, just return 2 if IDENTIFIER_REPO_CHOSEN
1778 2008-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1781 * pt.c (do_decl_instantiation): In c++0x mode do not warn for
1784 2008-06-24 Jonathan Wakely <jwakely.gcc@gmail.com>
1787 * typeck.c (cp_build_function_call): Show example syntax in
1790 2008-06-21 Jonathan Wakely <jwakely.gcc@gmail.com>
1792 * typeck.c (composite_pointer_type_r, cxx_sizeof_expr,
1793 cxx_alignof_expr, check_template_keyword, cp_build_binary_op,
1794 pointer_diff, cp_build_unary_op, build_x_compound_expr_from_list,
1795 build_reinterpret_cast_1, cp_build_c_cast, check_return_expr): Change
1796 pedwarn to permerror.
1797 * init.c (perform_member_init, build_new_1, build_new): Likewise.
1798 * decl.c (warn_extern_redeclared_static, duplicate_decls,
1799 * identify_goto, check_previous_goto_1, check_goto, define_label,
1800 check_tag_decl, start_decl, check_class_member_definition_namespace,
1801 grokfndecl, grokdeclarator): Likewise.
1802 * except.c (check_handlers): Likewise.
1803 * typeck2.c (digest_init): Likewise.
1804 * pt.c (check_specialization_namespace,
1805 check_explicit_instantiation_namespace,
1806 maybe_process_partial_specialization, check_explicit_specialization,
1807 convert_template_argument, do_decl_instantiation,
1808 do_type_instantiation, instantiate_decl): Likewise.
1809 * semantics.c (finish_template_type_parm): Likewise.
1810 * name-lookup.c (pushdecl_maybe_friend,
1811 check_for_out_of_scope_variable): Likewise.
1812 * decl2.c (finish_static_data_member_decl, build_anon_union_vars,
1813 coerce_new_type): Likewise.
1814 * parser.c (cp_parser_nested_name_specifier_opt,
1815 cp_parser_mem_initializer, cp_parser_elaborated_type_specifier,
1816 cp_parser_class_head, cp_parser_check_class_key): Likewise.
1817 (cp_parser_parameter_declaration): Check flag_permissive instead of
1818 flag_pedantic_errors.
1819 * call.c (joust): Change pedwarn to warning.
1820 * friend.c (make_friend_class): Likewise.
1822 2008-06-16 Jan Hubicka <jh@suse.cz>
1824 * method.c: Include cgraph.h.
1825 (use_thunk): Use cgraph_add_new_function instead of calling backend
1828 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1830 * parser.c: Fix comment typo.
1832 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1835 * decl2.c (grokbitfield): Receive the list of attributes, pass it to
1836 grokdeclarator and apply it to the created declaration.
1837 * cp-tree.h (grokbitfield): Update prototype.
1838 * parser.c (cp_parser_member_declaration): Don't apply the attributes
1839 since they are now applied in grokbitfield. Adjusted the call to
1841 (cp_parser_objc_class_ivars): Likewise.
1843 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1846 * class.c (type_requires_array_cookie): Do not consider delete[]
1847 operators with an ellipsis as second argument.
1849 2008-06-09 Jakub Jelinek <jakub@redhat.com>
1852 * semantics.c (stmt_expr_value_expr): Don't crash on empty
1855 2008-06-08 Paolo Carlini <paolo.carlini@oracle.com>
1858 * pt.c (maybe_process_partial_specialization): Check the tree
1859 returned by push_template_decl for error_mark_node.
1860 * parser.c (cp_parser_class_head): Likewise, check the tree
1861 returned by the latter.
1863 2008-06-07 Paolo Carlini <paolo.carlini@oracle.com>
1866 * decl.c (grokdeclarator): In case of wrong return type return
1867 immediately error_mark_node.
1869 2008-06-06 Jakub Jelinek <jakub@redhat.com>
1871 * cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
1872 dependent_omp_for_p, begin_omp_task, finish_omp_task,
1873 finish_omp_taskwait): New prototypes.
1874 (cxx_omp_clause_default_ctor): Add outer argument.
1875 (finish_omp_for): Add new clauses argument.
1876 * cp-gimplify.c (cxx_omp_finish_clause): New function.
1877 (cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten.
1878 (cxx_omp_clause_default_ctor): Add outer argument.
1879 (cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
1880 * cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
1881 * parser.c (cp_parser_omp_for_loop): Parse collapsed for loops.
1882 Add par_clauses argument. If decl is present in parallel's
1883 lastprivate clause, change that clause to shared and add
1884 a lastprivate clause for decl to OMP_FOR_CLAUSES.
1885 Fix wording of error messages. Adjust finish_omp_for caller.
1886 Add clauses argument. Parse loops with random access iterators.
1887 (cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New
1889 (cp_parser_omp_for, cp_parser_omp_parallel): Adjust
1890 cp_parser_omp_for_loop callers.
1891 (cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper
1893 (cp_parser_omp_clause_name): Handle collapse and untied
1895 (cp_parser_omp_clause_schedule): Handle auto schedule.
1896 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
1897 and PRAGMA_OMP_CLAUSE_UNTIED.
1898 (OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE.
1899 (OMP_TASK_CLAUSE_MASK): Define.
1900 (cp_parser_omp_task, cp_parser_omp_taskwait): New functions.
1901 (cp_parser_omp_construct): Handle PRAGMA_OMP_TASK.
1902 (cp_parser_pragma): Handle PRAGMA_OMP_TASK and
1903 PRAGMA_OMP_TASKWAIT.
1904 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
1905 OMP_CLAUSE_UNTIED. Handle OMP_CLAUSE_LASTPRIVATE_STMT.
1906 (tsubst_omp_for_iterator): New function.
1907 (dependent_omp_for_p): New function.
1908 (tsubst_expr) <case OMP_FOR>: Use it. Handle collapsed OMP_FOR
1909 loops. Adjust finish_omp_for caller. Handle loops with random
1910 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR} changes.
1911 (tsubst_expr): Handle OMP_TASK.
1912 * semantics.c (cxx_omp_create_clause_info): New function.
1913 (finish_omp_clauses): Call it. Handle OMP_CLAUSE_UNTIED and
1914 OMP_CLAUSE_COLLAPSE.
1915 (cxx_omp_predetermined_sharing): Removed.
1916 * semantics.c (finish_omp_for): Allow pointer iterators. Use
1917 handle_omp_for_class_iterator and dependent_omp_for_p. Handle
1918 collapsed for loops. Adjust c_finish_omp_for caller. Add new
1919 clauses argument. Fix check for type dependent cond or incr.
1920 Set OMP_FOR_CLAUSES to clauses. Use cp_convert instead of
1921 fold_convert to convert incr amount to difference_type. Only
1922 fold if not in template. If decl is mentioned in lastprivate
1923 clause, set OMP_CLAUSE_LASTPRIVATE_STMT. Handle loops with random
1924 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR}
1926 (finish_omp_threadprivate): Allow static class members of the
1928 (handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
1929 finish_omp_taskwait): New functions.
1931 * parser.c (cp_parser_binary_expression): Add prec argument.
1932 (cp_parser_assignment_expression): Adjust caller.
1933 * cp-tree.h (outer_curly_brace_block): New prototype.
1934 * decl.c (outer_curly_brace_block): No longer static.
1936 2008-06-02 Paolo Carlini <paolo.carlini@oracle.com>
1939 * pt.c (push_template_decl_real): Consistently return error_mark_node
1942 2008-06-02 Tomas Bily <tbily@suse.cz>
1944 * typeck.c (is_bitfield_expr_with_lowered_type): Use CASE_CONVERT.
1945 (cp_build_unary_op): Likewise.
1946 (cp_build_indirect_ref): Use CONVERT_EXPR_P.
1947 (maybe_warn_about_returning_address_of_local): Likewise.
1949 2008-05-29 Paolo Carlini <paolo.carlini@oracle.com>
1952 * pt.c (tsubst_initializer_list): Consistently check the tree
1953 returned by tsubst_pack_expansion for error_mark_node.
1955 2008-05-27 Michael Matz <matz@suse.de>
1958 * call.c (build_new_op): Make warning conditional on
1961 2008-05-27 Alexandre Oliva <aoliva@redhat.com>
1964 * call.c (convert_like_real): Convert bitfield to desired type
1965 before creating temporary.
1967 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
1969 * Makefile.in: Adjusted dependencies on c-incpath.o.
1971 2008-05-23 Jakub Jelinek <jakub@redhat.com>
1974 * cp-gimplify.c (cxx_omp_clause_apply_fn): Call
1975 fold_build_cleanup_point_expr on build_call_a results.
1978 * semantics.c (omp_clause_info_fndecl): New function.
1979 (finish_omp_clauses): Use it.
1981 2008-05-21 Jakub Jelinek <jakub@redhat.com>
1984 * cp-tree.h (check_array_initializer): New prototype.
1985 * decl.c (check_array_initializer): New function.
1986 (check_initializer): Call it.
1987 * semantics.c (finish_compound_literal): Call it for ARRAY_TYPEs.
1989 2008-05-21 Tom Tromey <tromey@redhat.com>
1991 * mangle.c (save_partially_mangled_name): Remove.
1992 (restore_partially_mangled_name): Likewise.
1993 (write_encoding): Update.
1994 (write_unqualified_name): Likewise.
1995 (start_mangling): Always use name_obstack. Remove 'ident_p'
1997 (get_identifier_nocopy): Remove.
1998 (finish_mangling_internal): Rename from finish_mangling.
1999 (finish_mangling): New function.
2000 (finish_mangling_get_identifier): Likewise.
2001 (partially_mangled_name, partially_mangled_name_len): Remove.
2002 (mangle_decl_string): Change return type. Update.
2003 (mangle_decl, mangle_type_string, mangle_special_for_type,
2004 mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable,
2005 mangle_ref_init_variable): Update.
2007 2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
2010 * semantics.c (begin_class_definition): Extend checks on the first
2013 2008-05-12 Tomas Bily <tbily@suse.cz>
2015 * typeck2.c (digest_init): Use CONVERT_EXPR_P.
2016 * call.c (build_over_call): Likewise.
2017 * error.c (dump_expr): Use CASE_CONVERT.
2018 * class.c (fixed_type_or_null): Likewise.
2020 2008-05-11 Volker Reichelt <v.reichelt@netcologne.de>
2022 * parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
2024 (cp_parser_omp_clause_schedule): Remove superfluous "expected"
2027 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
2029 * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
2030 DECL_LOOPING_CONST_OR_PURE_P attributes.
2031 * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
2034 2008-05-02 Simon Baldwin <simonb@google.com>
2037 * typeck.c (build_array_ref): Remove warn_array_subscript_range.
2039 2008-05-01 Simon Baldwin <simonb@google.com>
2041 * typeck.c (build_array_ref): Call warn_array_subscript_range.
2043 2008-04-30 Jakub Jelinek <jakub@redhat.com>
2046 * pt.c (more_specialized_fn): Stop the loop even if there are no
2047 arguments before ellipsis.
2049 2008-04-29 Jakub Jelinek <jakub@redhat.com>
2052 * parser.c (cp_parser_lookup_name): Look through single function
2056 * typeck.c (cp_build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
2057 COMPOUND_EXPR if the second argument would be error_mark_node.
2059 2008-04-28 Jason Merrill <jason@redhat.com>
2060 Liu Guanwei <liu_gw@163.com>
2063 * parser.c (cp_parser_parameter_declaration): Handle < ambiguity
2064 in default arguments.
2066 2008-04-25 Jan Hubicka <jh@suse.cz>
2068 * typeck.c (check_return_expr): Update.
2069 * decl.c (start_preparsed_function): Update.
2070 * method.c (use_thunk): Update.
2072 2008-04-24 Jakub Jelinek <jakub@redhat.com>
2075 * cp-tree.h (cp_reconstruct_complex_type): New prototype.
2076 * cp-objcp-common.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
2077 * decl2.c (is_late_template_attribute): Only make vector_size
2078 late tmpl attribute if argument is type or value dependent.
2079 (cp_reconstruct_complex_type): New function.
2081 2008-04-24 Richard Guenther <rguenther@suse.de>
2083 * typeck.c (cp_build_function_call): Call
2084 check_builtin_function_arguments.
2086 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
2088 * typeck.c (get_member_function_from_ptrfunc): Don't set TREE_INVARIANT.
2089 (build_ptrmemfunc1): Don't set TREE_INVARIANT.
2090 * init.c (build_zero_init): Don't set TREE_INVARIANT.
2091 * class.c (build_base_path): Don't set TREE_INVARIANT.
2092 (build_vtbl_ref_1): Don't set TREE_INVARIANT.
2093 (build_vtbl_initializer): Don't set TREE_INVARIANT.
2094 * decl.c (build_enumerator): Don't set TREE_INVARIANT.
2095 * rtti.c (tinfo_base_init): Don't set TREE_INVARIANT.
2096 (generic_initializer): Don't set TREE_INVARIANT.
2097 (ptr_initializer): Don't set TREE_INVARIANT.
2098 (ptm_initializer): Don't set TREE_INVARIANT.
2099 (class_initializer): Don't set TREE_INVARIANT.
2100 * typeck2.c (process_init_constructor): Don't set TREE_INVARIANT.
2101 * pt.c (push_inline_template_parms_recursive): Don't set TREE_INVARIANT.
2102 (build_template_parm_index): Don't set TREE_INVARIANT.
2103 (reduce_template_parm_level): Don't set TREE_INVARIANT.
2104 (process_template_parm): Don't set TREE_INVARIANT.
2106 2008-04-22 Jason Merrill <jason@redhat.com>
2109 * semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
2110 to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
2111 * typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
2113 2008-04-22 Jakub Jelinek <jakub@redhat.com>
2116 * semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
2117 expression is errorneous.
2119 2008-04-21 Jason Merrill <jason@redhat.com>
2122 * tree.c (cp_tree_equal): Handle FIXED_CST.
2125 * pt.c (template_template_parm_bindings_ok_p): Set
2126 processing_template_decl while in this function.
2128 2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
2130 * cvt.c (type_promotes_to): Support char16_t and char32_t.
2131 * decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
2132 char16_t and char32_t.
2133 * lex.c (reswords): Add char16_t and char32_t (for c++0x).
2134 * mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
2135 extended builtin type "u8char{16,32}_t".
2136 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
2138 (cp_lexer_print_token): Support CPP_STRING{16,32}.
2139 (cp_parser_is_string_literal): Idem.
2140 (cp_parser_string_literal): Idem.
2141 (cp_parser_primary_expression): Support CPP_CHAR{16,32} and
2143 (cp_parser_simple_type_specifier): Support RID_CHAR{16,32}.
2144 * tree.c (char_type_p): Support char16_t and char32_t as char types.
2145 * typeck.c (string_conv_p): Support char16_t and char32_t.
2147 2008-04-17 Jason Merrill <jason@redhat.com>
2150 * call.c (build_user_type_conversion_1): Represent second step of
2151 copy-init with an rvalue conversion.
2152 (convert_like_real) [ck_user]: Don't implicitly add it here.
2154 2008-04-15 Jakub Jelinek <jakub@redhat.com>
2157 * decl.c (layout_var_decl): If extern or static var has variable
2158 size, set TREE_TYPE (decl) to error_mark_node.
2160 2008-04-16 Danny Smith <dannysmith@users.sourceforge.net>
2163 * optimize.c (maybe_clone_body): Copy DECL_DLLIMPORT_P flag
2166 2008-04-09 Jason Merrill <jason@redhat.com>
2169 * semantics.c (finish_compound_literal): Return a TARGET_EXPR,
2170 not a pushed variable.
2172 2008-04-09 Volker Reichelt <v.reichelt@netcologne.de>
2174 * call.c (build_op_delete_call): Fix quotation in warning message.
2175 * decl.c (grokdeclarator): Quote keyword in error message.
2176 * pt.c (check_for_bare_parameter_packs): Fix quotation in error
2179 * parser.c (cp_parser_check_type_definition): Print error string
2180 directly rather than using "%s".
2181 (cp_parser_postfix_expression): Fix quotation.
2182 (cp_parser_decltype): Likewise.
2183 (cp_parser_sizeof_operand): Fix quotation. Simplify.
2185 * parser.c (cp_parser_non_integral_constant_expression): Build error
2186 message with CONCAT rather than using "%s".
2187 (cp_parser_primary_expression): Fix quotation.
2188 (cp_parser_postfix_expression): Likewise.
2189 (cp_parser_postfix_dot_deref_expression): Likewise.
2190 (cp_parser_unary_expression): Likewise.
2191 (cp_parser_new_expression): Likewise.
2192 (cp_parser_delete_expression): Likewise.
2194 * parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
2195 as `)', not as `('. Fix quotation.
2196 (cp_parser_consume_semicolon_at_end_of_statement): Fix quotation.
2197 (cp_parser_primary_expression): Likewise.
2198 (cp_parser_nested_name_specifier_opt): Likewise.
2199 (cp_parser_postfix_expression): Likewise.
2200 (cp_parser_postfix_open_square_expression): Likewise.
2201 (cp_parser_parenthesized_expression_list): Likewise.
2202 (cp_parser_pseudo_destructor_name): Likewise.
2203 (cp_parser_new_expression): Likewise.
2204 (cp_parser_direct_new_declarator): Likewise.
2205 (cp_parser_delete_expression): Likewise.
2206 (cp_parser_cast_expression): Likewise.
2207 (cp_parser_question_colon_clause): Likewise.
2208 (cp_parser_builtin_offsetof): Likewise.
2209 (cp_parser_trait_expr): Likewise.
2210 (cp_parser_label_for_labeled_statement): Likewise.
2211 (cp_parser_compound_statement): Likewise.
2212 (cp_parser_selection_statement): Likewise.
2213 (cp_parser_condition): Likewise.
2214 (cp_parser_iteration_statement): Likewise.
2215 (cp_parser_already_scoped_statement): Likewise.
2216 (cp_parser_simple_declaration): Likewise.
2217 (cp_parser_linkage_specification): Likewise.
2218 (cp_parser_static_assert): Likewise.
2219 (cp_parser_decltype): Likewise.
2220 (cp_parser_conversion_function_id): Likewise.
2221 (cp_parser_operator_function_id): Likewise.
2222 (cp_parser_operator): Likewise.
2223 (cp_parser_type_parameter): Likewise.
2224 (cp_parser_template_id): Likewise.
2225 (cp_parser_explicit_instantiation): Likewise.
2226 (cp_parser_explicit_specialization): Likewise.
2227 (cp_parser_enum_specifier): Likewise.
2228 (cp_parser_namespace_definition): Likewise.
2229 (cp_parser_namespace_alias_definition): Likewise.
2230 (cp_parser_using_declaration): Likewise.
2231 (cp_parser_using_directive): Likewise.
2232 (cp_parser_asm_definition): Likewise.
2233 (cp_parser_direct_declarator): Likewise.
2234 (cp_parser_ptr_operator): Likewise.
2235 (cp_parser_parameter_declaration_clause): Likewise.
2236 (cp_parser_initializer_clause): Likewise.
2237 (cp_parser_class_specifier): Likewise.
2238 (cp_parser_member_specification_opt): Likewise.
2239 (cp_parser_member_declaration): Likewise.
2240 (cp_parser_pure_specifier): Likewise.
2241 (cp_parser_constant_initializer): Likewise.
2242 (cp_parser_base_clause): Likewise.
2243 (cp_parser_exception_specification_opt): Likewise.
2244 (cp_parser_try_block): Likewise.
2245 (cp_parser_function_try_block): Likewise.
2246 (cp_parser_handler): Likewise.
2247 (cp_parser_throw_expression): Likewise.
2248 (cp_parser_asm_operand_list): Likewise.
2249 (cp_parser_attributes_opt): Likewise.
2250 (cp_parser_label_declaration): Likewise.
2251 (cp_parser_constructor_declarator_p): Likewise.
2252 (cp_parser_template_declaration_after_export): Likewise.
2253 (cp_parser_single_declaration): Likewise.
2254 (cp_parser_objc_message_expression): Likewise.
2255 (cp_parser_objc_message_args): Likewise.
2256 (cp_parser_objc_encode_expression): Likewise.
2257 (cp_parser_objc_defs_expression): Likewise.
2258 (cp_parser_objc_protocol_expression): Likewise.
2259 (cp_parser_objc_selector_expression): Likewise.
2260 (cp_parser_objc_protocol_refs_opt): Likewise.
2261 (cp_parser_objc_typename): Likewise.
2262 (cp_parser_objc_method_keyword_params): Likewise.
2263 (cp_parser_objc_superclass_or_category): Likewise.
2264 (cp_parser_objc_try_catch_finally_statement): Likewise.
2265 (cp_parser_objc_synchronized_statement): Likewise.
2266 (cp_parser_objc_throw_statement): Likewise.
2267 (cp_parser_omp_var_list_no_open): Likewise.
2268 (cp_parser_omp_clause_default): Likewise.
2269 (cp_parser_omp_clause_if): Likewise.
2270 (cp_parser_omp_clause_num_threads): Likewise.
2271 (cp_parser_omp_clause_reduction): Likewise.
2272 (cp_parser_omp_clause_schedule): Likewise.
2273 (cp_parser_omp_critical): Likewise.
2274 (cp_parser_omp_for_loop): Likewise.
2275 (cp_parser_omp_sections_scope): Likewise.
2277 * parser.c (cp_parser_template_parameter_list): Simplify.
2279 2008-04-07 James E. Wilson <wilson@tuliptree.org>
2281 * pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
2283 2008-04-07 Jason Merrill <jason@redhat.com>
2286 * class.c (type_has_user_nondefault_constructor): A template
2287 counts as a nondefault constructor.
2289 2008-04-04 Paolo Bonzini <bonzini@gnu.org>
2291 * decl.c (cxx_push_function_context): Delete.
2292 (cxx_pop_function_context): Delete.
2293 (start_preparsed_function): Merge cxx_push_function_context (!f->decl
2295 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_INIT,
2296 LANG_HOOKS_FUNCTION_FINAL): Delete.
2297 (LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P): Rename to
2298 LANG_HOOKS_MISSING_NORETURN_OK_P.
2299 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context):
2301 * semantics.c (current_stmt_tree): Fix comment.
2303 2008-04-03 Jakub Jelinek <jakub@redhat.com>
2306 * semantics.c (finish_offsetof): Undo effect of convert_from_reference
2307 before calling fold_offsetof.
2309 2008-04-03 Tom Tromey <tromey@redhat.com>
2311 * Make-lang.in (c++_OBJS): New variable.
2313 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
2315 * optimize.c (clone_body): New, from tree-inline.c.
2317 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
2319 * method.c (synthesize_method): Use {push,pop}_function_context.
2320 * name-lookup.c (push_to_top_level): Likewise.
2321 * parser.c (cp_parser_late_parsing_for_member): Likewise.
2323 2008-03-30 Volker Reichelt <v.reichelt@netcologne.de>
2326 * parser.c (cp_parser_decl_specifier_seq): Add location to error
2329 2008-03-27 Tom Tromey <tromey@redhat.com>
2331 * Make-lang.in: Revert automatic dependency patch.
2333 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
2336 * typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
2337 (build_compound_expr): New, for compatibility with C
2338 build_compound_expr.
2339 (cp_build_compound_expr): Renamed from build_compound_expr.
2340 (build_c_cast): New, for compatibility with C build_c_cast.
2341 (cp_build_c_cast): Renamed from build_c_cast.
2342 * init.c (build_vec_delete_1): Fix calls to build_compound_expr.
2343 * decl.c (cxx_maybe_build_cleanup): Ditto.
2344 * cp-tree.h (build_compound_expr): Add C-compatibile prototype.
2345 (cp_build_compound_expr): Renamed from build_compound_expr.
2346 (build_c_cast): Add C-compatible prototype.
2347 (cp_build_c_cast): Renamed from build_c_cast.
2348 * typeck2.c (build_functional_cast): Use cp_build_c_cast.
2349 * parser.c (cp_parser_cast_expression): Fix call to build_c_cast.
2351 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
2353 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Cope with
2354 tsubst_pack_expansion returning a pack expansion, or a TREE_VEC
2355 ending in a pack expansion, both of which can occur when
2356 substituting into a nested template.
2357 (tsubst_copy_and_build) <case SIZEOF_EXPR>: When we're
2358 instantiating the sizeof...(X) form, make tsubst_copy do the work.
2359 * parser.c (cp_parser_template_parameter): Deal with unnamed
2360 non-type template parameter packs identified by pack expansions in
2363 2008-03-26 Jakub Jelinek <jakub@redhat.com>
2366 * pt.c (apply_late_template_attributes): Don't call tsubst on
2367 first attribute argument if it is IDENTIFIER_NODE.
2370 * error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
2371 and LTGT_EXPR to pp_expression.
2373 2008-03-26 Douglas Gregor <doug.gregor@gmail.com>
2375 * pt.c (coerce_template_template_parm): Moved the body of the loop
2376 of coerce_template_template_parms here, to make iteration over a
2377 template argument pack simpler.
2378 Also, allow matching of a template parameter pack in the template
2379 template parameter to a template parameter in the template
2381 (coerce_template_template_parms): Deal with variadic template
2382 template parameters. Use coerce_template_template_parm.
2383 (unify): Make sure we coerce the template template argument's
2384 template arguments to the template template parameter's template
2385 parameters, not the other way around.
2387 2008-03-25 Tom Tromey <tromey@redhat.com>
2389 * Make-lang.in: Remove .o targets.
2390 (cp/g++spec.o): Moved to cp/. Reduce to variable setting.
2392 (c++_OBJS): New variable.
2393 (CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
2395 2008-03-25 Douglas Gregor <doug.gregor@gmail.com>
2397 * typeck.c (composite_pointer_type_r): Add SFINAE support.
2398 (composite_pointer_type): Ditto.
2399 (common_type): Fix call to composite_pointer_type.
2400 (cxx_sizeof_nowarn): New; used to be a macro.
2401 (cxx_sizeof_expr): Add SFINAE support.
2402 (cxx_alignof_expr): Ditto.
2403 (decay_conversion): Fix calls for SFINAE support.
2404 (rationalize_conditional_expr): Add SFINAE support.
2405 (build_class_member_access_expr): Ditto.
2406 (finish_class_member_access_expr): Ditto.
2407 (build_x_indirect_ref): Ditto.
2408 (build_indirect_ref): Original version renamed to
2409 cp_build_indirect_ref; new version provides a bridge from
2411 (cp_build_indirect_ref): Was build_indirect_ref; added SFINAE
2413 (get_member_function_from_ptrfunc): Fix calls for SFINAE support.
2414 (build_function_call): Original version renamed to
2415 cp_build_function_call; new version provides a bridge from
2417 (cp_build_function_call): Was build_function_call; added SFINAE
2419 (convert_arguments): Add SFINAE support.
2420 (build_x_binary_op): Ditto.
2421 (build_binary_op): Original version renamed to cp_build_binary_op;
2422 new version provides a bridge from c-common.
2423 (cp_build_binary_op): Was build_binary_op; added SFINAE support.
2424 (pointer_diff): Fix calls for SFINAE.
2425 (build_x_unary_op): Add SFINAE support.
2426 (condition_conversion): Fix calls for SFINAE.
2427 (build_unary_op): Original version renamed to cp_build_unary_op;
2428 new version provides a bridge from c-common.
2429 (cp_build_unary_op): Was build_unary_op; added SFINAE support.
2430 (unary_complex_lvalue): Fix calls for SFINAE.
2431 (build_x_conditional_expr): Add SFINAE support.
2432 (build_x_compound_expr_from_list): Fix calls for SFINAE.
2433 (build_x_compound_expr): Add SFINAE support.
2434 (convert_ptrmem): Fix calls for SFINAE.
2435 (build_static_cast_1): Add SFINAE support.
2436 (build_static_cast): Ditto.
2437 (build_reinterpret_cast_1): Ditto.
2438 (build_reinterpret_cast): Ditto.
2439 (build_const_cast_1): Ditto.
2440 (build_const_cast): Ditto.
2441 (build_c_cast): Ditto.
2442 (build_modify_expr): Original version renamed to
2443 cp_build_modify_expr; new version provides a bridge from c-common.
2444 (cp_build_modify_expr): Was build_modify_expr; added SFINAE
2446 (build_x_modify_expr): Add SFINAE support.
2447 (build_ptrmemfunc): Fix calls for SFINAE.
2448 (convert_for_assignment): Add SFINAE support.
2449 (convert_for_initialization): Ditto.
2450 (check_return_expr): Fix calls for SFINAE.
2451 (lvalue_or_else): Add SFINAE support.
2452 * init.c (perform_member_init): Fix calls for SFINAE.
2453 (emit_mem_initializers): Ditto.
2454 (expand_virtual_init): Ditto.
2455 (expand_cleanup_for_base): Ditto.
2456 (build_aggr_init): Add SFINAE support.
2457 (expand_default_init): Ditto.
2458 (expand_aggr_init_1): Fix calls for SFINAE.
2459 (build_offset_ref): Ditto.
2460 (build_new_1): Add SFINAE support.
2462 (build_vec_delete_1): Fix calls for SFINAE.
2463 (get_temp_regvar): Ditto.
2464 (build_vec_init): Add SFINAE support.
2465 (build_dtor_call): Fix calls for SFINAE.
2466 (build_delete): Ditto.
2467 (push_base_cleanups): Ditto.
2468 (build_vec_delete_1): Ditto.
2469 * class.c (build_base_path): Fix calls for SFINAE.
2470 (build_simple_base_path): Ditto.
2471 (convert_to_base_statically): Ditto.
2472 (build_vfn_ref): Ditto.
2473 (resolve_address_of_overloaded_function): Ditto.
2474 * decl.c (check_initializer): Fix calls for SFINAE.
2475 (register_dtor_fn): Ditto.
2476 (compute_array_index_type): Ditto.
2477 (finish_enum): Ditto.
2478 (start_preparsed_function): Ditto.
2479 (cxx_maybe_build_cleanup): Ditto.
2480 * call.c (convert_like): Add COMPLAIN argument.
2481 (convert_like_with_context): Ditto.
2482 (build_this): Fix calls for SFINAE.
2483 (build_user_type_conversion): Ditto.
2484 (resolve_args): Ditto.
2485 (build_new_function_call): Add SFINAE support.
2486 (build_operator_new_call): Fix calls for SFINAE.
2487 (build_object_call): Add SFINAE support.
2488 (build_conditional_expr): Ditto.
2489 (build_new_op): Ditto.
2490 (build_op_delete_call): Fix calls for SFINAE.
2491 (build_temp): Ditto.
2492 (convert_like_real): Add SFINAE support.
2493 (build_x_va_arg): Fix calls for SFINAE.
2494 (convert_default_arg): Ditto.
2495 (build_over_call): Add SFINAE support.
2496 (build_java_interface_fn_ref): Fix calls for SFINAE.
2497 (build_special_member_call): Add SFINAE support.
2498 (build_new_method_call): Ditto.
2499 (perform_implicit_conversion): Ditto.
2500 (perform_direct_initialization_if_possible): Ditto.
2501 (initialize_reference): Fix calls for SFINAE.
2502 * method.c (do_build_assign_ref): Fix calls for SFINAE.
2503 * rtti.c (build_headof): Fix calls for SFINAE.
2504 (get_tinfo_decl_dynamic): Ditto.
2505 (get_typeid): Ditto.
2506 (build_dynamic_cast_1): Add SFINAE support.
2507 (build_dynamic_cast): Ditto.
2508 (tinfo_base_init): Fix calls for SFINAE.
2509 * except.c (do_get_exception_ptr): Fix calls for SFINAE.
2510 (do_end_catch): Ditto.
2511 (initialize_handler_parm): Ditto.
2512 (expand_start_catch_block): Ditto.
2513 (do_allocate_exception): Ditto.
2514 (do_free_exception): Ditto.
2515 (build_throw): Ditto.
2516 * cvt.c (build_up_reference): Fix calls for SFINAE.
2517 (convert_to_reference): Ditto.
2518 (ocp_convert): Ditto.
2519 (convert_to_void): Add SFINAE support.
2520 * tree.c (build_dummy_object): Fix calls for SFINAE.
2521 (stabilize_expr): Ditto.
2522 * cp-tree.h (build_conditional_expr): Add tsubst_flags_t
2524 (build_new_method_call): Ditto.
2525 (build_special_member_call): Ditto.
2526 (build_new_op): Ditto.
2527 (perform_implicit_conversion): Ditto.
2528 (perform_direct_initialization_if_possible): Ditto.
2529 (convert_to_void): Ditto.
2530 (build_aggr_init): Ditto.
2532 (build_vec_init): Ditto.
2533 (build_dynamic_cast): Ditto.
2534 (finish_call_expr): Ditto
2535 (cxx_sizeof_or_alignof_expr): Add COMPLAIN parameter.
2536 (cxx_sizeof_nowarn): Remove macro; add function declaration.
2537 (build_class_member_access_expr): Add tsubst_flags_t parameter.
2538 (finish_class_member_access_expr): Ditto.
2539 (build_x_indirect_ref): Ditto.
2540 (cp_build_indirect_ref): New.
2541 (cp_build_function_call): Add tsubst_flags_t parameter.
2542 (build_x_unary_op): Ditto.
2543 (cp_build_unary_op): New.
2544 (build_x_conditional_expr): Add tsubst_flags_t parameter.
2545 (build_x_compound_expr): Ditto.
2546 (build_compound_expr): Ditto.
2547 (build_static_cast): Ditto.
2548 (build_reinterpret_cast): Ditto.
2549 (build_const_cast): Ditto.
2550 (build_c_cast): Ditto.
2551 (build_x_modify_expr): Ditto.
2552 (cp_build_modify_expr): New.
2553 (convert_for_initialization): Add tsubst_flags_t parameter.
2554 (cp_build_binary_op): Remove macro; add function declaration.
2555 (invalid_nonstatic_memfn_p): Add tsubst_flags_t parameter.
2556 (lvalue_or_else): Ditto.
2557 (build_functional_cast): Ditto.
2558 * typeck2.c (digest_init): Fix calls for SFINAE.
2559 (process_init_constructor_array): Ditto.
2560 (process_init_constructor_record): Ditto.
2561 (build_x_arrow): Ditto.
2562 (build_m_component_ref): Ditto.
2563 (build_functional_cast): Add SFINAE support.
2564 * pt.c (tsubst_copy_and_build): Add (more) SFINAE support.
2565 * semantics.c (simplify_loop_decl_cond): Fix calls for SFINAE.
2566 (finish_expr_stmt): Ditto.
2567 (finish_for_expr): Ditto.
2568 (finish_asm_stmt): Ditto.
2569 (finish_non_static_data_member): Ditto.
2570 (finish_qualified_id_expr): Ditto.
2571 (finish_call_expr): Add SFINAE support.
2572 (finish_increment_expr): Fix calls for SFINAE.
2573 (finish_unary_op_expr): Ditto.
2574 (simplify_aggr_init_expr): Ditto.
2575 (finish_omp_clauses): Ditto.
2576 (finish_omp_for): Ditto.
2577 (finish_omp_barrier): Ditto.
2578 (finish_omo_flush): Ditto.
2579 * decl2.c (grok_array_decl): Fix calls or SFINAE.
2580 (build_anon_union_vars): Ditto.
2581 (get_guard_cond): Ditto.
2583 (one_static_initialization_or_destruction): Ditto.
2584 (do_static_initialization_or_destruction): Ditto.
2585 (generate_ctor_or_dtor_function): Ditto.
2586 (build_offset_ref_call_from_tree): Ditto.
2587 * parser.c (cp_parser_postfix_expression): Fix calls for SFINAE.
2588 (cp_parser_postfix_dot_deref_expression): Ditto.
2589 (cp_parser_unary_expression): Ditto.
2590 (cp_parser_new_expression): Ditto.
2591 (cp_parser_cast_expression): Ditto.
2592 (cp_parser_binary_expression): Ditto.
2593 (cp_parser_question_colon_clause): Ditto.
2594 (cp_parser_assignment_expression): Ditto.
2595 (cp_parser_expression): Ditto.
2596 (cp_parser_builtin_offsetof): Ditto.
2597 (cp_parser_template_argument): Ditto.
2598 (cp_parser_functional_cast): Ditto.
2600 2008-03-24 Tom Tromey <tromey@redhat.com>
2602 * lex.c (handle_pragma_interface): Don't copy the filename.
2603 (handle_pragma_implementation): Copy filename using xstrdup.
2605 2008-03-21 Paolo Carlini <pcarlini@suse.de>
2607 * cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P.
2608 (SET_IS_AGGR_TYPE): Rename to SET_CLASS_TYPE_P.
2609 (IS_AGGR_TYPE_CODE): Rename to RECORD_OR_UNION_CODE_P.
2610 (PROMOTES_TO_AGGR_TYPE): Remove.
2611 (CLASS_TYPE_P, TYPE_NON_AGGREGATE_CLASS): Adjust.
2612 * typeck.c (unary_complex_lvalue, build_modify_expr,
2613 convert_for_initialization): Adjust.
2614 * init.c (is_aggr_type): Remove.
2615 (is_class_type): Add.
2616 (build_offset_ref, build_new_1, build_vec_delete_1, build_vec_init,
2617 build_delete): Adjust.
2618 * lex.c (make_aggr_type): Remove.
2619 (make_class_type): Add.
2620 (cxx_make_type): Adjust.
2621 * class.c (finish_struct_1, fixed_type_or_null, is_empty_class):
2623 * decl.c (build_typename_type, make_typename_type,
2624 make_unbound_class_template, cxx_init_decl_processing,
2625 check_tag_decl, groktypename, start_decl_1, layout_var_decl,
2626 check_initializer, cp_finish_decl, build_ptrmemfunc_type, grokparms,
2627 grok_op_properties, xref_tag, check_function_type): Adjust.
2628 * call.c (check_dtor_name, standard_conversion, implicit_conversion,
2629 add_builtin_candidate, add_builtin_candidates,
2630 build_user_type_conversion_1, convert_like_real, build_cxx_call,
2631 is_subseq, compare_ics): Adjust.
2632 * method.c (use_thunk): Adjust.
2633 * rtti.c (build_dynamic_cast_1, create_pseudo_type_info,
2634 create_tinfo_types): Adjust.
2635 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
2636 build_up_reference, convert_to_reference, convert_from_reference,
2637 ocp_convert, build_expr_type_conversion): Adjust.
2638 * tree.c (bind_template_template_parm, error_type): Adjust.
2639 * dump.c (cp_dump_tree): Adjust.
2640 * search.c (lookup_member): Adjust.
2641 * friend.c (make_friend_class, do_friend): Adjust.
2642 * typeck2.c (store_init_value, process_init_constructor_array,
2643 process_init_constructor_record, build_x_arrow, build_m_component_ref,
2644 build_functional_cast): Adjust.
2645 * pt.c (finish_member_template_decl, process_template_parm,
2646 lookup_template_class, tsubst_function_type, tsubst,
2647 tsubst_copy_and_build, get_template_base, bt_instantiate_type_proc):
2649 * semantics.c (begin_class_definition, finish_base_specifier,
2650 finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
2652 * name-lookup.c (constructor_name_p, push_overloaded_decl,
2653 do_class_using_decl, lookup_qualified_name,
2654 maybe_process_template_type_declaration): Adjust.
2655 * decl2.c (grok_array_decl, check_member_template,
2656 constrain_class_visibility): Adjust.
2657 * parser.c (cp_parser_class_name): Adjust.
2659 2008-03-18 Paolo Bonzini <bonzini@gnu.org>
2661 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
2663 2008-03-17 Jason Merrill <jason@redhat.com>
2666 * call.c (reference_binding): Check LOOKUP_NO_TEMP_BIND when binding
2667 a temp directly to a reference as per DR391.
2669 2008-03-12 Richard Guenther <rguenther@suse.de>
2673 2008-02-04 Richard Guenther <rguenther@suse.de>
2676 * decl.c (record_builtin_java_type): Make jboolean a
2677 integer type again where its mode doesn't match that of bool.
2679 2008-01-25 Richard Guenther <rguenther@suse.de>
2682 * decl.c (record_builtin_java_type): Make __java_boolean
2684 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
2685 after TYPE_MAIN_VARIANT check.
2687 2008-03-10 Jakub Jelinek <jakub@redhat.com>
2690 * semantics.c (finish_omp_clauses): Look through NOP_EXPR even
2694 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
2695 DECL_P in not a variable and appears more than once error messages.
2697 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
2701 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
2705 * typeck.c (structural_comptypes): Call cp_comptypes.
2706 (comptypes): New; called from the C/C++ common bits to perform
2708 (cp_comptypes): Renamed from comptypes, which is already used,
2709 with a different signature, by the C++ front end.
2710 (build_reinterpret_cast_1): Call cp_comptypes.
2711 (ptr_reasonably_similar): Ditto.
2712 * decl.c (decls_match): Ditto.
2713 * cvt.c (convert_to_reference): Ditto.
2714 * cp-tree.h (same_type_p): Ditto.
2715 (same_or_base_type_p): Ditto.
2716 (comptypes): Rename to cp_comptypes.
2717 * pt.c (canonical_type_parameter): Call cp_comptypes.
2719 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
2721 * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
2722 test for equivalence between pointer and references.
2724 2008-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2727 * class.c (finish_struct_anon): Use permerror instead of pedwarn.
2728 (check_field_decls): Likewise.
2729 (note_name_declared_in_class): Likewise.
2730 * call.c (build_new_op): Likewise.
2731 (convert_like_real): Likewise.
2732 (build_over_call): Likewise.
2733 * lex.c (unqualified_fn_lookup_error): Likewise.
2734 * parser.c (cp_parser_template_id): Likewise.
2735 * cvt.c (warn_ref_binding): Likewise.
2736 (convert_to_reference): Likewise.
2737 (ocp_convert): Likewise.
2738 (convert_to_void): Use error instead of pedwarn.
2739 * error.c (cp_cpp_error): Use pedantic_warning_kind.
2740 * decl.c (compute_array_index_type): Use constant_expression_error.
2742 2008-03-01 Douglas Gregor <doug.gregor@gmail.com>
2744 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Note
2745 that auto is either a storage class or a simple type specifier,
2746 depending on the dialect.
2747 (cp_parser_decl_specifier_seq): Complain about `auto' as a storage
2748 specifier in C++98 mode, error in C++0x mode (since we don't
2749 support auto as a type specifier, yet).
2750 (cp_parser_storage_class_specifier_opt): Don't treat `auto' as a
2751 storage specifier in C++0x mode.
2752 (cp_parser_simple_type_specifier): Parse `auto' as a
2753 simple-type-specifier, but error because we don't support it yet.
2755 2008-02-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2757 * parser.c (cp_parser_nonclass_name): New.
2758 (cp_parser_pseudo_destructor_name): Use it instead of
2759 cp_parser_type_name.
2760 (cp_parser_type_name): Move code to cp_parser_nonclass_name.
2762 2008-02-29 Tom Tromey <tromey@redhat.com>
2764 * parser.c (struct cp_token) <input_file_stack_index>: Remove.
2765 (cp_lexer_get_preprocessor_token): Update.
2766 (cp_lexer_set_source_position_from_token): Don't call
2767 restore_input_file_stack.
2768 * lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
2770 2008-02-28 Richard Guenther <rguenther@suse.de>
2773 2008-02-26 Richard Guenther <rguenther@suse.de>
2775 * decl.c (duplicate_decls): Remove decl from global mapping
2776 before ggc_freeing it.
2778 2008-02-27 Jakub Jelinek <jakub@redhat.com>
2781 * rtti.c: Include c-pragma.h.
2782 (push_abi_namespace, pop_abi_namespace): New functions.
2783 (build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
2784 create_tinfo_types, emit_support_tinfos): Use them.
2785 * Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
2787 2008-02-26 Jason Merrill <jason@redhat.com>
2790 * decl.c (grokdeclarator): Allow a typedef of an unnamed struct
2791 to name the struct for linkage purposes even if it has attributes.
2792 (start_decl): In that case, set ATTR_FLAG_TYPE_IN_PLACE.
2794 2008-02-26 Tom Tromey <tromey@redhat.com>
2796 * parser.c (eof_token): Remove old location code.
2797 (check_empty_body): Remove test of USE_MAPPED_LOCATION.
2798 * decl2.c (generate_ctor_or_dtor_function): Remove old location
2800 (cp_write_global_declarations): Likewise.
2801 * lex.c (cxx_init): Remove old location code.
2802 (handle_pragma_implementation): Remove test of
2803 USE_MAPPED_LOCATION.
2804 * pt.c (tsubst): Remove old location code.
2805 * error.c (cp_print_error_function): Remove test of
2806 USE_MAPPED_LOCATION.
2807 * decl.c (pop_label): Remove old location code.
2808 (finish_function): Likewise.
2810 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2813 * call.c (magic_varargs_p): Remove BUILT_IN_STDARG_START.
2815 2008-02-26 Richard Guenther <rguenther@suse.de>
2817 * decl.c (duplicate_decls): Remove decl from global mapping
2818 before ggc_freeing it.
2820 2008-02-26 Paolo Carlini <pcarlini@suse.de>
2823 * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
2825 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2827 * typeck.c (build_class_member_access_expr): Add appropriate
2828 OPT_W* parameter to warning.
2829 (build_reinterpret_cast_1): Likewise.
2830 * name-lookup.c (push_overloaded_decl): Likewise.
2832 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2835 * error.c (dump_expr): Handle CONJ_EXPR.
2837 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2840 * error.c (dump_type): Handle FIXED_POINT_TYPE.
2841 (dump_expr): Handle FIXED_CST.
2843 2008-02-24 Jason Merrill <jason@redhat.com>
2845 * parser.c (cp_parser_declaration): Handle "inline namespace".
2846 (cp_parser_namespace_definition): Likewise.
2849 * name-lookup.c (arg_assoc_namespace): Look down into inline
2852 2008-02-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2854 * typeck.c (check_for_casting_away_constness): Use 1 single
2855 argument, the type of cast, to decide what diagnostics generate.
2856 (build_static_cast_1): Remove unused code. Update call to
2857 check_for_casting_away_constness.
2858 (build_reinterpret_cast_1): Update call to
2859 check_for_casting_away_constness.
2860 (build_const_cast_1): Likewise.
2862 2008-02-24 Paolo Carlini <pcarlini@suse.de>
2864 * error.c (dump_expr): Don't deal directly with NEW_EXPR (and
2865 VEC_NEW_EXPR), forward to pp_expression.
2866 * cxx-pretty-print.c (pp_cxx_new_expression): Fix FIXME.
2868 2008-02-24 Danny Smith <dannysmith@users.sourceforge.net>
2871 * friend.c (do_friend): Call cplus_decl_attributes earlier.
2873 2008-02-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
2876 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
2877 template decls' function decl.
2879 2008-02-22 Paolo Carlini <pcarlini@suse.de>
2883 2008-02-14 Paolo Carlini <pcarlini@suse.de>
2886 * pt.c (determine_specialization): In case of function templates,
2887 when the type of DECL does not match FN there is no match.
2889 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2892 * typeck.c (build_binary_op): Warn about floating point
2893 comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
2895 2008-02-19 Jason Merrill <jason@redhat.com>
2898 * pt.c (resolve_overloaded_unification): Set processing_template_decl
2899 while we look for possible bindings.
2901 2008-02-19 Jakub Jelinek <jakub@redhat.com>
2904 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
2908 * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
2909 vars. Afterwards ensure v is VAR_DECL.
2912 * parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
2913 call cp_finish_decl.
2914 * semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
2917 2008-02-15 Douglas Gregor <doug.gregor@gmail.com>
2922 * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
2923 is error_mark_node, return an error early.
2924 (find_parameter_packs_r): Pass the pointer set along to recursive
2925 calls of cp_walk_subtrees; don't try to manage the pointer set
2927 (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
2928 (make_pack_expansion): Ditto.
2929 (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
2930 a second pass through the tree with find_parameter_packs_r; that
2931 second pass no longer does anything.
2932 (push_template_decl_real): If we have an erroneous declaration,
2933 set its type to error_mark_node before returning an error.
2935 2008-02-14 Douglas Gregor <doug.gregor@gmail.com>
2938 * pt.c (tsubst_initializer_list): Deal with the use of
2939 VOID_TYPE_NODE to indicate value-initialization of the bases.
2941 2008-02-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2942 Jason Merrill <jason@redhat.com>
2946 * class.c (type_has_user_nondefault_constructor): New fn.
2947 * cp-tree.h: Declare it.
2948 * init.c (emit_mem_initializers): Use it for -W warning about
2949 missing base initializer.
2951 2008-02-14 Paolo Carlini <pcarlini@suse.de>
2954 * pt.c (determine_specialization): In case of function templates,
2955 when the type of DECL does not match FN there is no match.
2957 2008-02-13 Jakub Jelinek <jakub@redhat.com>
2958 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2961 * parser.c (cp_parser_pseudo_destructor_name): If next tokens
2962 are not identifier :: ~, return before calling cp_parser_type_name.
2964 2008-02-13 Jason Merrill <jason@redhat.com>
2966 PR c++/34962, c++/34937, c++/34939
2967 * decl2.c (is_late_template_attribute): Always defer attributes
2968 vector_size and weak.
2971 * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
2972 of enumerators, too.
2974 2008-02-12 Jason Merrill <jason@redhat.com>
2977 * call.c (convert_like_real): Pass LOOKUP_NO_CONVERSION to build_temp
2978 if we're doing conversions to call a user-defined conversion function.
2980 2008-02-12 Steven Bosscher <steven@gcc.gnu.org>
2983 * semantics.c (finish_qualified_id_expr): Avoid duplicate access
2986 2008-02-12 Jakub Jelinek <jakub@redhat.com>
2989 * init.c (build_new_1): Don't create placement_expr before
2990 constructing alloc_call. Verify that the pointer is passed by
2991 value to operator new.
2993 2008-02-11 Jason Merrill <jason@redhat.com>
2996 * pt.c (tsubst): Don't look up a template typedef in an explicit
2999 2008-02-11 Douglas Gregor <doug.gregor@gmail.com>
3002 * tree.c (cp_build_qualified_type_real): When building a
3003 cv-qualified array type, build it as a unique type with
3004 build_cplus_array_type_1 and then adopt the unqualified type's
3007 2008-02-11 Paolo Carlini <pcarlini@suse.de>
3010 * decl.c (groktypename): Check grokdeclarator return.
3012 2008-02-10 Jason Merrill <jason@redhat.com>
3015 * decl2.c (cp_write_global_declarations): Don't write out static
3016 data members with DECL_IN_AGGR_P set.
3018 2008-02-08 Jason Merrill <jason@redhat.com>
3021 * tree.c (build_target_expr_with_type): Handle void initializer.
3022 (bot_manip): Remap slot before recursing.
3024 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3027 * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
3029 2008-02-06 Alexandre Oliva <aoliva@redhat.com>
3032 * tree.c: Include tree-flow.h.
3033 (build_target_expr): Check type compatibility.
3034 * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
3035 * call.c (convert_like_real): Convert bitfield to expected type.
3037 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
3041 * typeck.c (structural_comptypes): Call cp_comptypes.
3042 (comptypes): New; called from the C/C++ common bits to perform
3044 (cp_comptypes): Renamed from comptypes, which is already used,
3045 with a different signature, by the C++ front end.
3046 (build_reinterpret_cast_1): Call cp_comptypes.
3047 (ptr_reasonably_similar): Ditto.
3048 * decl.c (decls_match): Ditto.
3049 * cvt.c (convert_to_reference): Ditto.
3050 * cp-tree.h (same_type_p): Ditto.
3051 (same_or_base_type_p): Ditto.
3052 (comptypes): Rename to cp_comptypes.
3053 * pt.c (canonical_type_parameter): Call cp_comptypes.
3055 2008-02-05 Jakub Jelinek <jakub@redhat.com>
3058 * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
3059 value dependent expression.
3061 2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
3064 * decl2.c (save_template_attributes): When we're modifying the
3065 TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
3066 all of the other variants to add those same attributes. Otherwise,
3067 the main variant will be inconsistent with those other variants.
3069 2008-02-04 Richard Guenther <rguenther@suse.de>
3072 * decl.c (record_builtin_java_type): Make jboolean a
3073 integer type again where its mode doesn't match that of bool.
3075 2008-02-02 Jason Merrill <jason@redhat.com>
3076 Mark Mitchell <mark@codesourcery.com>
3079 * init.c (build_value_init_1): New function.
3080 (build_value_init): New function.
3081 * typeck2.c (build_functional_cast): Call it.
3082 * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
3084 * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from
3085 TYPE_HAS_CONSTRUCTOR.
3086 * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
3087 add_implicitly_declared_members): Adjust.
3088 (check_field_decls): Adjust. Remove warnings about reference/const
3089 in class without constructor.
3090 (check_bases_and_members): Adjust. Give those warnings here instead.
3091 * decl.c (fixup_anonymous_aggr): Adjust.
3092 (check_initializer): Adjust, clarify logic slightly.
3093 (grok_special_member_properties): Adjust, only set if user-provided.
3094 * rtti.c (create_tinfo_types): Don't set.
3095 * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
3096 Use same_type_ignoring_top_level_qualifiers_p.
3097 * pt.c (check_explicit_specialization): Adjust.
3098 (instantiate_class_template): Adjust.
3100 2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
3101 Jakub Jelinek <jakub@redhat.com>
3105 * typeck.c (structural_comptypes): Handle comparisons of
3106 VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
3108 * mangle.c (write_builtin_type): Map down to the canonical type,
3109 which will be one of the predefined type nodes.
3111 2008-01-29 Michael Meissner <michael.meissner@amd.com>
3114 * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
3115 bits to allow for expansion of the number of middle end tree
3118 2008-01-29 Douglas Gregor <doug.gregor@gmail.com>
3129 * typeck.c (check_return_expr): Tweak call to
3130 check_for_bare_parameter_packs.
3131 * class.c (add_method): Be careful with error_mark_nodes.
3132 * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
3134 * pt.c (struct find_parameter_pack_data): Remove
3136 (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
3137 (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
3138 (make_pack_expansion): Ditto.
3139 (check_for_bare_parameter_packs): Parameter is now a tree, not a
3141 (process_template_parm): Tweak call to
3142 check_for_bare_parameter_packs.
3143 (push_template_decl_real): Tweak calls to
3144 check_for_bare_parameter_packs. If bare parameter packs are found
3145 in the list of exceptions, clear out that list after giving an
3147 * semantics.c (finish_cond): Tweak call to
3148 check_for_bare_parameter_packs.
3149 (finish_expr_stmt): Ditto.
3150 (finish_for_expr): Ditto.
3151 (finish_switch_cond): Ditto.
3152 (finish_mem_initializers): Ditto.
3153 (finish_member_declaration): Ditto.
3154 (finish_static_assert): Check for bare parameter packs in the
3156 * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
3157 attributes of a declaration.
3158 * parser.c (cp_parser_using_declaration): Tweak call to
3159 check_for_bare_parameter_packs.
3160 (cp_parser_base_clause): Ditto.
3162 2008-01-28 Jason Merrill <jason@redhat.com>
3165 * class.c (build_base_path): Fix !want_pointer case.
3167 2008-01-27 Jason Merrill <jason@redhat.com>
3170 * class.c (build_base_path): Fix previous change.
3172 2008-01-26 Jakub Jelinek <jakub@redhat.com>
3175 * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
3178 2008-01-26 Richard Guenther <rguenther@suse.de>
3181 * typeck.c (build_binary_op): Remove code to shorten compares.
3183 2008-01-25 Richard Guenther <rguenther@suse.de>
3186 * decl.c (record_builtin_java_type): Make __java_boolean
3188 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
3189 after TYPE_MAIN_VARIANT check.
3191 2008-01-25 Jason Merrill <jason@redhat.com>
3194 * class.c (build_base_path): Don't mess with virtual access if
3196 * call.c (standard_conversion): Don't check whether source type
3199 * decl2.c (is_late_template_attribute): Don't defer attribute
3200 visibility just because the type is dependent.
3202 2008-01-25 Jason Merrill <jason@redhat.com>
3203 Mark Mitchell <mark@codesourcery.com>
3206 * call.c (standard_conversion): Allow conversion from integer/real
3208 (compare_ics): Such a conversion is worse than a normal arithmetic
3211 2008-01-25 Richard Guenther <rguenther@suse.de>
3214 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
3217 2008-01-24 Paolo Carlini <pcarlini@suse.de>
3220 * pt.c (push_template_decl_real): Return error_mark_node in case
3221 of template definition of non-template.
3223 2008-01-24 Jason Merrill <jason@redhat.com>
3226 * decl2.c (is_late_template_attribute): Defer any attribute with
3227 dependent args. Also defer type attributes if the type is dependent.
3229 2008-01-22 Jakub Jelinek <jakub@redhat.com>
3230 Alexandre Oliva <aoliva@redhat.com>
3233 * call.c (reference_binding): For bitfields use the declared bitfield
3235 (add_builtin_candidates): Likewise.
3236 * class.c (layout_class_type): For bitfields copy over the
3237 original type quals.
3239 2008-01-22 Jason Merrill <jason@redhat.com>
3242 * decl.c (groktypename): Also ignore attributes on dependent
3243 possibly-class types.
3246 * friend.c (do_friend): Check for prior declaration of a friend
3247 function of a local class.
3248 * name-lookup.c (lookup_name_innermost_nonclass_level):
3250 * name-lookup.h: Declare it.
3252 2008-01-22 Tom Tromey <tromey@redhat.com>
3255 * init.c (build_new_1): Only disallow Java aggregates.
3257 2008-01-22 Jakub Jelinek <jakub@redhat.com>
3260 * semantics.c (finish_omp_for): Don't call c_finish_omp_for
3261 if decl or init is error_mark_node.
3264 * error.c (dump_expr): Handle VECTOR_CST.
3266 2008-01-21 Jason Merrill <jason@redhat.com>
3269 * pt.c (tsubst_aggr_type): Make sure our context is complete.
3272 * pt.c (retrieve_local_specialization): Robustify.
3273 (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
3276 * pt.c (tsubst): Only call retrieve_local_specialization if the
3277 original typedef was in a function template.
3280 * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
3282 2008-01-21 Richard Guenther <rguenther@suse.de>
3285 * error.c (cp_print_error_function): Deal with recursive
3288 2008-01-20 Paolo Carlini <pcarlini@suse.de>
3291 * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
3293 2008-01-20 Paolo Carlini <pcarlini@suse.de>
3297 * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
3298 on non-IS_AGGR_TYPE scope.
3299 (constructor_name_p): Assert IS_AGGR_TYPE.
3301 2008-01-18 Ian Lance Taylor <iant@google.com>
3304 * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
3305 (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
3306 DECL_IS_OPERATOR_NEW flag.
3308 2008-01-16 Richard Guenther <rguenther@suse.de>
3311 * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
3312 for conversions to type variants.
3314 2008-01-15 Andreas Tobler <a.tobler@schweiz.org>
3316 * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
3317 declaration and code. Update copyright year.
3319 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3322 * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
3323 know we have a class type.
3325 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3328 * pt.c (coerce_template_parameter_pack): When substituting into
3329 the type of a non-type template parameter pack. use the
3330 deduced/substituted arguments.
3331 * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
3332 can be a parameter pack with the ellipsis following it. When we
3333 have an erroneous declaration, allow it to be a parameter pack.
3334 (cp_parser_template_parameter): Complain about default
3335 arguments on non-type template parameter packs, and parse them
3336 using the new cp_parser_default_argument.
3337 (cp_parser_parameter_declaration): Complain about parameter packs
3338 with default arguments. Move parsing of default arguments into a
3339 new function, cp_parser_default_argument.
3340 (cp_parser_default_argument): New; extracted from
3341 cp_parser_parameter_declaration.
3343 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3349 * typeck.c (check_return_expr): If there are bare parameter packs
3350 in the return value, set it to error_mark_node.
3351 * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
3352 * pt.c (find_parameter_packs_r): Look at the type of
3353 IDENTIFIER_NODEs (e.g., for user-defined conversions).
3354 (check_for_bare_parameter_packs): Flip the result: now returns
3355 TRUE when there were bare parameter packs, FALSE otherwise.
3356 (push_template_decl_real): Deal with flipped result of
3357 check_for_bare_parameter_packs.
3358 * semantics.c (finish_cond): If there are bare parameter packs in
3359 the conditional, set it to error_mark_node.
3360 (finish_expr_stmt): If there are bare parameter packs in the
3361 expression, set it to error_mark_node.
3362 (finish_for_expr): Ditto.
3363 (finish_switch_cond): If there are bare parameter packs in
3364 the conditional, set it to error_mark_node.
3365 (finish_mem_initializers): If there are bare parameter packs in
3366 the member initializer, set it to error_mark_node.
3367 (finish_member_declaration): Check the attributes of the
3368 declaration for bare parameter packs, and remove the attributes if
3369 any have bare parameter packs.
3370 * parser.c (cp_parser_using_declaration): Check the using
3371 declaration for bare parameter packs.
3372 (cp_parser_base_clause): If there are bare parameter packs in a
3373 base specifier, don't add it to the chain.
3375 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3378 * error.c (dump_simple_decl): Display ellipsis for template
3379 non-type parameter packs.
3380 (dump_decl): Display ellipsis for template type parameter packs.
3381 (dump_template_decl): Display ellipsis for template template
3383 * pt.c (redeclare_class_template): When redeclaring a class
3384 template, check for collisions between template parameters and
3385 template parameter packs.
3387 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3390 * pt.c (process_partial_specialization): Don't mark template
3391 parameters that occur in non-deduced contexts.
3392 (struct pair_fn_data): Add include_nondeduced_p.
3393 (for_each_template_parm_r): Only visit non-deduced contexts if
3394 include_nondeduced_p is set.
3395 (for_each_template_parm): Added parameter include_nondeduced_p,
3396 which states whether template parameters found in non-deduced
3397 contexts should be visited.
3398 (uses_template_parms): Visit all template parameters, even those
3399 in non-deduced contexts.
3401 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3404 * pt.c (check_default_tmpl_args): Check for parameter packs that
3405 aren't at the end of a primary template.
3406 (push_template_decl_real): Remove check for parameter packs that
3407 aren't at the end of a primary template; that now happens in
3408 check_default_tmpl_args.
3409 * semantics.c (finish_template_template_parm): Use
3410 check_default_tmpl_args to check for errors in the template
3413 2008-01-12 Doug Kwan <dougkwan@google.com>
3415 * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
3416 instead of OPT_Wreturn_type in warning due to ignored return type
3418 * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
3419 instead of OPT_Wreturn_type in warning due to ignored return type
3422 2008-01-08 Jakub Jelinek <jakub@redhat.com>
3425 * semantics.c (finish_omp_for): Don't call
3426 fold_build_cleanup_point_expr if processing_template_decl.
3428 2008-01-04 Paolo Carlini <pcarlini@suse.de>
3429 Jakub Jelinek <jakub@redhat.com>
3432 * error.c (dump_template_argument): Deal with TREE_LIST.
3434 2008-01-01 Douglas Gregor <doug.gregor@gmail.com>
3436 * parser.c (cp_parser_check_decl_spec): Don't warn about "long
3437 long" in C++0x mode; change the warning to note that "long long"
3438 is only unsupported in C++98 mode.
3440 2007-12-20 Jason Merrill <jason@redhat.com>
3443 * call.c (standard_conversion): Derived-to-base is considered a
3444 standard conversion.
3446 2007-12-19 Jakub Jelinek <jakub@redhat.com>
3449 * parser.c (cp_parser_omp_parallel): For non-combined parallel
3450 call cp_parser_statement rather than
3451 cp_parser_already_scoped_statement.
3453 2007-12-18 Jason Merrill <jason@redhat.com>
3456 * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
3458 (dependent_type_p_r): Handle the domain of an array.
3460 2007-12-18 Douglas Gregor <doug.gregor@gmail.com>
3461 Jakub Jelinek <jakub@redhat.com>
3466 * pt.c (template_template_parm_bindings_ok_p): New; verifies
3467 bindings of template template parameters after all template
3468 arguments have been deduced.
3469 (coerce_template_parms): Don't complain when COMPLAIN doesn't
3471 (fn_type_unification): Use template_template_parm_bindings_ok_p.
3472 (unify): Deal with variadic, bound template template parameters.
3473 (get_class_bindings): Use template_template_parm_bindings_ok_p.
3475 2007-12-18 Jakub Jelinek <jakub@redhat.com>
3478 * decl.c (grokdeclarator): Reject friend sfk_constructor
3481 2007-12-17 Jakub Jelinek <jakub@redhat.com>
3484 * parser.c (cp_parser_omp_all_clauses): Accept optional comma
3487 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
3490 * cp-lang.c (cp_classify_record): New.
3491 (LANG_HOOKS_CLASSIFY_RECORD): Override.
3493 2007-12-11 Jakub Jelinek <jakub@redhat.com>
3496 * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
3499 * rtti.c (build_dynamic_cast): Call convert_from_reference even for
3500 dynamic_cast in a template.
3502 2007-12-10 Simon Martin <simartin@users.sourceforge.net>
3505 * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
3506 MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
3508 2007-12-10 Jakub Jelinek <jakub@redhat.com>
3511 * error.c (dump_type_prefix, dump_type_suffix): Handle
3512 TYPE_PACK_EXPANSION.
3515 * error.c (dump_expr): Handle ABS_EXPR.
3517 2007-12-09 Jakub Jelinek <jakub@redhat.com>
3521 * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
3522 in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
3523 Return 2 also if DECL_EXPLICIT_INSTANTIATION.
3524 * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
3525 flag_use_repository and repo_emit_p returned 2.
3527 2007-12-06 Jakub Jelinek <jakub@redhat.com>
3530 * tree.c (stabilize_call, stabilize_init): Do nothing if
3531 processing_template_decl.
3533 2007-12-05 Jakub Jelinek <jakub@redhat.com>
3536 * semantics.c (finish_decltype_type): For SCOPE_REF issue an
3537 error instead of assertion failure.
3538 * parser.c (cp_parser_decltype): If closing paren is not found,
3539 return error_mark_node.
3541 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3544 * name-lookup.c (arg_assoc_template_arg): Recurse on argument
3546 (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
3547 since arg_assoc_template_arg will deal with them (better).
3549 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3552 * pt.c (tsubst_exception_specification): Handle substitutions into
3553 member templates, where tsubst_pack_expansion returns a
3554 TYPE_PACK_EXPANSION.
3556 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3559 * pt.c (unify_pack_expansion): If we didn't deduce any actual
3560 bindings for the template parameter pack, don't try to keep the
3561 empty deduced arguments.
3562 (unify): If a parameter is a template-id whose template argument
3563 list contains a pack expansion that is not at the end, then we
3564 cannot unify against that template-id.
3566 2007-12-02 Paolo Carlini <pcarlini@suse.de>
3569 * pt.c (current_template_args): Use error_operand_p.
3571 2007-12-02 Paolo Carlini <pcarlini@suse.de>
3574 * error.c (dump_decl): Handle TREE_BINFO.
3576 2007-12-01 Ollie Wild <aaw@google.com>
3579 * typeck.c (build_binary_op): Add conversion of pointers to function
3580 members appearing as operands to the equality operators.
3582 2007-11-30 Jakub Jelinek <jakub@redhat.com>
3585 * error.c (dump_expr): Handle OBJ_TYPE_REF.
3587 2007-11-29 Jakub Jelinek <jakub@redhat.com>
3590 * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
3592 * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
3597 * parser.c (cp_parser_decltype): Don't call finish_id_expression
3599 * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
3602 2007-11-27 Jakub Jelinek <jakub@redhat.com>
3604 PR tree-optimization/34181
3605 * method.c (use_thunk): Don't inline the call in the thunk.
3608 * tree.c (decl_linkage): Static data members and static member
3609 functions in anonymous ns classes are lk_external.
3611 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
3614 * decl.c (start_preparsed_function): Pass
3615 processing_template_decl for the new allocate_struct_function
3618 2007-11-25 Richard Guenther <rguenther@suse.de>
3620 * decl.c (poplevel): Use BLOCK_CHAIN.
3622 2007-11-24 Ollie Wild <aaw@google.com>
3624 * typeck.c (delta_from_ptrmemfunc): New function.
3625 (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
3626 (build_binary_op): Call delta_from_ptrmemfunc.
3628 2007-11-23 Jakub Jelinek <jakub@redhat.com>
3632 * decl.c (cp_finish_decl): Disallow variable or field
3633 definitions if extern "Java" aggregates.
3634 (grokparms): Disallow parameters with extern "Java"
3636 (check_function_type): Disallow function return values
3637 with extern "Java" aggregates.
3638 * init.c (build_new_1): Disallow placement new with
3639 extern "Java" aggregates.
3641 2007-11-23 Mark Mitchell <mark@codesourcery.com>
3642 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3645 * call.c (convert_like_real): Build a zero constant when __null is
3646 converted to an integer type.
3648 2007-11-22 Jakub Jelinek <jakub@redhat.com>
3651 * decl2.c (cp_write_global_declarations): Issue error about static
3652 data members in anonymous namespace which are declared and used,
3655 2007-11-20 Jakub Jelinek <jakub@redhat.com>
3658 * parser.c (cp_parser_class_head): Reject function template ids.
3661 * tree.c (build_cplus_array_type_1): Don't pass any VLA types
3662 when processing_template_decl to build_array_type.
3665 * pt.c (more_specialized_fn): Don't segfault if one or
3666 both argument list end with ellipsis.
3668 2007-11-18 Jakub Jelinek <jakub@redhat.com>
3671 * semantics.c (finish_call_expr): Set
3672 current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
3673 or OVERLOAD with all noreturn functions.
3675 2007-11-16 Jakub Jelinek <jakub@redhat.com>
3678 * pt.c (apply_late_template_attributes): Do nothing if decl's type is
3681 2007-11-13 Jakub Jelinek <jakub@redhat.com>
3688 * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
3689 set to error_mark_node the outermost POINTER_TYPE to the pack if
3690 it is seen in a POINTER_TYPE.
3691 (push_template_decl_real): If check_for_bare_parameter_packs
3692 fails for function return type, set the return type to
3693 integer_type_node. If check_for_bare_parameter_packs failed
3694 for non-function, return error_mark_node.
3697 * call.c (build_new_op): Call resolve_args before calling
3700 2007-11-11 Tom Tromey <tromey@redhat.com>
3703 * lex.c (handle_pragma_implementation): Use cpp_included_before.
3705 2007-11-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3708 * pt.c (redeclare_class_template): Update error message. Use a
3709 note to show the previous declaration.
3710 (tsubst_friend_class): Use the location of the friend template as
3711 the input location before calling redeclare_class_template.
3713 2007-11-11 Jakub Jelinek <jakub@redhat.com>
3716 * semantics.c (finish_pseudo_destructor_expr): Handle
3717 object == error_mark_node.
3719 2007-11-10 Jakub Jelinek <jakub@redhat.com>
3722 * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
3723 is not scalar type, let finish_class_member_access_expr handle
3724 diagnostics. Pass BIT_NOT_EXPR argument to
3725 finish_pseudo_destructor_expr. Handle SCOPE_REF properly.
3727 2007-11-09 Douglas Gregor <doug.gregor@gmail.com>
3730 * decl.c (cp_complete_array_type): If any of the initializer
3731 elements are pack expansions, don't compute the array size yet.
3733 2007-11-08 Andrew Pinski <pinskia@gmail.com>
3736 * tree.c (decl_linkage): Fields have no linkage.
3738 2007-11-08 Daniel Jacobowitz <dan@codesourcery.com>
3740 * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
3742 2007-11-07 Douglas Gregor <doug.gregor@gmail.com>
3747 * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
3748 Be careful with ERROR_MARK_NODEs.
3749 * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
3752 2007-11-07 Jakub Jelinek <jakub@redhat.com>
3755 * call.c (build_over_call): Don't check TREE_ADDRESSABLE
3758 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
3762 * tree.c (c_build_qualified_type): Define bridge to
3763 cp_build_qualified_type.
3765 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
3776 * typeck.c (check_return_expr): Pass address of retval to
3777 check_for_bare_parameter_packs.
3778 * class.c (build_base_field): Tolerate bases that have no layout
3780 (end_of_base): Ditto.
3781 * tree.c (canonical_type_variant): Be careful with
3783 * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
3785 * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
3786 which states whether parameter packs should be replaced with
3788 (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
3789 possible. If set_packs_to_error is set true, replace the parameter
3790 pack with ERROR_MARK_NODE. Manage our own pointer sets.
3791 (uses_parameter_packs): Don't set parameter packs to
3793 (check_for_bare_parameter_packs): Now takes a pointer to a tree,
3794 which may be modified (if it is a parameter pack). Instructs
3795 find_parameter_packs_r to replace parameter packs with
3796 ERROR_MARK_NODE (so that they won't cause errors later on).
3797 (process_template_parm): Pass pointer to
3798 check_for_bare_parameter_packs.
3799 (process_partial_specialization): Replace pack expansions before
3800 the end of the template argument list with ERROR_MARK_NODE.
3801 (push_template_decl_real): Pass pointer to
3802 check_for_bare_parameter_packs. Replace parameter packs not at the
3803 end of the template parameter list with ERROR_MARK_NODE.
3804 (convert_template_argument): Be more careful about using DECL_NAME
3805 on only declarations.
3806 (unify): Can't unify against ERROR_MARK_NODE.
3807 * semantics.c (finish_cond): Pass pointer to
3808 check_for_bare_parameter_packs.
3809 (finish_expr_stmt): Ditto.
3810 (finish_for_expr): Ditto.
3811 (finish_switch_cond): Pass pointer to
3812 check_for_bare_parameter_packs, and call it before we put the
3813 condition into the statement.
3814 (finish_mem_initializers): Pass pointer to
3815 check_for_bare_parameter_packs.
3816 (finish_member_declaration): Ditto.
3817 * parser.c (cp_parser_base_clause): Ditto.
3819 2007-11-06 Jakub Jelinek <jakub@redhat.com>
3822 * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
3823 with the final TREE_READONLY flag in place. processing_template_decl
3824 is known to be 0 in this part of function.
3827 * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
3828 OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
3829 * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
3830 * semantics.c (finish_omp_atomic): Revert most of the
3831 2007-02-05 changes, just keep the new representation of
3832 OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
3834 2007-11-05 H.J. Lu <hongjiu.lu@intel.com>
3837 * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
3840 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
3845 * typeck.c (merge_types): Don't lose rvalue references when
3847 * call.c (build_over_call): Don't elide move constructors just
3848 because the copy constructor is trivial (!).
3849 (compare_ics): If comparing cv-qualifiers fails, we can still order
3850 based on binding lvalues vs. rvalues.
3852 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
3855 * pt.c (unify_pack_expansion): bring handling of function call
3856 arguments into line with type_unification_real.
3858 2007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3860 * typeck.c (build_binary_op): Use pedwarn instead of error for
3863 2007-11-05 Jakub Jelinek <jakub@redhat.com>
3866 * parser.c (cp_parser_unary_expression): For &&label call
3867 cp_parser_non_integral_constant_expression and return error_mark_node
3868 if it returned true.
3871 * decl.c (grokdeclarator): Don't call build_memfn_type if type
3872 is neither FUNCTION_TYPE nor METHOD_TYPE.
3874 2007-11-02 Jakub Jelinek <jakub@redhat.com>
3877 * parser.c (cp_parser_nested_name_specifier_opt): Use
3878 TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
3879 typedef of currently open class.
3881 2007-11-02 Paolo Carlini <pcarlini@suse.de>
3884 * error.c (dump_expr): Deal specially with statements.
3886 2007-11-01 Jason Merrill <jason@redhat.com>
3889 * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
3891 (lookup_template_class): Use it to get the outer template args
3892 for instantiating one.
3895 * pt.c (reduce_template_parm_level): tsubst the parameters
3896 of a template template parm.
3898 2007-11-01 Douglas Gregor <doug.gregor@gmail.com>
3901 * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
3903 2007-11-01 Jakub Jelinek <jakub@redhat.com>
3906 * parser.c (cp_parser_postfix_dot_deref_expression): If
3907 POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
3908 first and if that succeeds and type is SCALAR_TYPE_P, create
3912 * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
3913 (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
3914 as for std::type_info.
3916 2007-10-31 Paolo Carlini <pcarlini@suse.de>
3919 * cxx-pretty-print.c (pp_cxx_typeid_expression,
3920 pp_cxx_delete_expression): Change to static linkage.
3921 * cxx-pretty-print.h: Adjust declarations.
3922 * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
3923 MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
3924 MODOP_EXPR): Forward to pp_expression.
3926 * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
3929 2007-10-31 Christian Bruel <christian.bruel@st.com>
3930 Mark Mitchell <mark@codesourcery.com>
3933 * typeck.c (check_return_expr): Don't set named_return_value_okay_p
3934 if retval is volatile.
3936 2007-10-30 Jakub Jelinek <jakub@redhat.com>
3939 * decl2.c (build_offset_ref_call_from_tree): Call
3940 build_non_dependent_expr on object prior to building ADDR_EXPR from it
3941 if FN is DOTSTAR_EXPR.
3943 2007-10-30 Douglas Gregor <doug.gregor@gmail.com>
3947 * pt.c (find_parameter_packs_r): Fix typo in comment.
3948 (convert_template_argument): Look at the pattern of a pack
3949 expansion to determine what kind of entity we're converting.
3950 (coerce_template_parameter_pack): When we have coerced a non-type
3951 template parameter pack, substitute into the type of that pack.
3952 (tsubst_pack_expansion): When our substitution of a parameter pack
3953 is a "trivial" substitution of itself, just substitute into the
3954 pack expansion rather than actually expanding.
3956 2007-10-29 Jakub Jelinek <jakub@redhat.com>
3959 * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
3960 for non-integral type bitfields. Return true if bitfield is correct, false
3961 error has been diagnosed.
3962 (check_field_decls): If check_bitfield_decl returned false, call also
3965 2007-10-28 Paolo Carlini <pcarlini@suse.de>
3966 Mark Mitchell <mark@codesourcery.com>
3969 * pt.c (do_decl_instantiation): If the VAR_DECL is not a
3970 class member error out and return.
3972 2007-10-27 Jakub Jelinek <jakub@redhat.com>
3974 * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
3975 to current_function_decl rather than 0.
3978 * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
3980 * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
3982 2007-10-27 Jason Merrill <jason@redhat.com>
3985 * call.c (convert_default_arg): Detect recursion.
3987 2007-10-27 Jakub Jelinek <jakub@redhat.com>
3990 * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
3991 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
3993 (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
3995 * error.c (dump_expr): Handle OFFSETOF_EXPR.
3997 2007-10-26 Jason Merrill <jason@redhat.com>
4000 * pt.c (get_template_info): New fn.
4001 (template_class_depth): Use it.
4002 (push_template_decl_real): Check that the template args of the
4003 definition match the args of the previous declaration.
4005 2007-10-26 Paolo Carlini <pcarlini@suse.de>
4008 * decl2.c (coerce_new_type): Do not allow a default argument for
4009 the first parameter.
4011 2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
4014 * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
4015 don't see the leading '('. Only lookup names if we get an
4018 2007-10-26 Jakub Jelinek <jakub@redhat.com>
4021 * parser.c (cp_parser_parenthesized_expression_list): Set
4022 greater_than_is_operator_p to true in between the parens.
4024 2007-10-26 Paolo Carlini <pcarlini@suse.de>
4027 * decl.c (grokdeclarator): In case of conflicting specifiers
4028 just return error_mark_node.
4030 2007-10-26 Ollie Wild <aaw@google.com>
4032 * expr.c (cxx_expand_expr): Removed.
4033 * cp-tree.h (exx_expand_expr): Removed.
4034 * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
4037 2007-10-25 Paolo Carlini <pcarlini@suse.de>
4040 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
4042 2007-10-23 Jason Merrill <jason@redhat.com>
4044 PR c++/25950 (DR 391)
4045 * call.c (struct conversion): Remove check_copy_constructor_p.
4046 (reference_binding): Always bind a reference directly to a
4047 compatible class rvalue. Pass down LOOKUP_NO_TEMP_BIND during
4049 (check_constructor_callable): Remove.
4050 (convert_like_real): Don't call it.
4051 (initialize_reference): Don't call check_constructor_callable.
4052 (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
4053 LOOKUP_CONSTRUCTOR_CALLABLE. Don't require a temporary for base
4054 conversions if LOOKUP_NO_TEMP_BIND.
4055 (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
4056 (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
4058 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
4060 2007-10-22 Jakub Jelinek <jakub@redhat.com>
4063 * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
4064 before checking if its type is integral.
4066 2007-10-22 Jason Merrill <jason@redhat.com>
4069 * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
4070 * pt.c (apply_late_template_attributes): Splice out dependent
4071 attributes from DECL_ATTRIBUTES.
4073 * decl.c (cxx_maybe_build_cleanup): Use build_address.
4075 2007-10-17 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4077 * typeck.c (build_binary_op) : Use appropriate warning option
4078 instead of unnamed warning.
4080 2007-10-16 Paolo Carlini <pcarlini@suse.de>
4083 * pt.c (current_template_args): Do not change TREE_LIST elements
4084 with a TREE_VALUE of error_mark_node.
4086 2007-10-16 Mark Mitchell <mark@codesourcery.com>
4088 * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
4089 * decl.c (start_decl): Tidy.
4090 (start_decl_1): Call cp_apply_type_quals_to_decl after completing
4092 (grokdeclarator): Clarify comment.
4094 2007-10-14 Andrew Pinski <pinskia@gmail.com>
4097 * decl.c (grokfndecl): Return NULL after the "definition of
4098 implicitly-declared" error happened.
4100 2007-10-12 Simon Martin <simartin@users.sourceforge.net>
4103 * call.c (build_user_type_conversion_1): Do not consider conversion
4104 functions to convert a (possibly cv-qualified) object to the (possibly
4105 cv-qualified) same object type (or a reference to it), to a (possibly
4106 cv-qualified) base class of that type (or a reference to it).
4108 2007-10-12 Paolo Carlini <pcarlini@suse.de>
4110 * pt.c (tsubst): Use template_parm_level_and_index.
4112 2007-10-12 Jakub Jelinek <jakub@redhat.com>
4115 * parser.c (cp_parser_compound_statement): Handle label-declarations
4116 at the beginning of the compound statement.
4117 (cp_parser_block_declaration): Issue diagnostics about __label__
4118 not at the beginning of a block.
4120 2007-10-11 Paolo Carlini <pcarlini@suse.de>
4123 * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
4124 to convert_template_argument.
4125 (coerce_template_parms): Return error_mark_node after fixed-length
4127 (tsubst_decl): Check for error_mark_node the return value of the
4128 first tsubst in 'case VAR_DECL'.
4130 2007-10-08 Ollie Wild <aaw@google.com>
4132 * typeck2.c (digest_init): Call cplus_expand_constant after
4133 convert_for_initialization.
4134 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
4135 * expr.c (cplus_expand_constant): Updated function description.
4137 2007-10-04 Jason Merrill <jason@redhat.com>
4140 * call.c (initialize_reference): Handle local static reference
4143 2007-10-03 Jason Merrill <jason@redhat.com>
4146 * name-lookup.c (push_namespace_with_attrs): Fold back into...
4147 (push_namespace): Here.
4148 (handle_namespace_attrs): New fn for the attr code.
4149 (leave_scope): Don't pop_visibility.
4150 * name-lookup.h (struct cp_binding_level): Remove has_visibility.
4151 * parser.c (cp_parser_namespace_definition): Call
4152 handle_namespace_attrs and pop_visibility as appropriate.
4155 * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
4157 2007-10-03 Alexandre Oliva <aoliva@redhat.com>
4159 * decl.c (duplicate_decls): Preserve linkage flags for mere
4160 redeclarations of gnu_inline definitions.
4162 2007-10-03 Jason Merrill <jason@redhat.com>
4165 * decl.c (wrap_cleanups_r): New fn.
4166 (wrap_temporary_cleanups): New fn.
4167 (initialize_local_var): Call it.
4169 2007-09-29 Jason Merrill <jason@redhat.com>
4172 * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
4173 constant to not have DECL_EXTERNAL if it's file-local.
4175 2007-09-28 Ollie Wild <aaw@google.com>
4178 2007-09-27 Ollie Wild <aaw@google.com>
4180 * typeck2.c (digest_init): Call cplus_expand_constant after
4181 convert_for_initialization.
4182 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
4183 * expr.c (cplus_expand_constant): Updated function description.
4185 2007-09-28 Jason Merrill <jason@redhat.com>
4188 * class.c (layout_empty_base): Take rli parameter, update
4189 rli->record_align if empty base has user-specified alignment.
4190 (build_base_field): Pass rli to it.
4192 2007-09-28 Paolo Carlini <pcarlini@suse.de>
4195 * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
4197 2007-09-28 Paolo Carlini <pcarlini@suse.de>
4200 * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
4201 (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
4202 (dump_parameters): Just call dump_type for argument packs too.
4204 2007-09-28 Jakub Jelinek <jakub@redhat.com>
4207 * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
4208 qualification by creating qualified PACK_EXPANSION_PATTERN and
4209 then calling make_pack_expansion on it.
4211 2007-09-27 Ollie Wild <aaw@google.com>
4213 * typeck2.c (digest_init): Call cplus_expand_constant after
4214 convert_for_initialization.
4215 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
4216 * expr.c (cplus_expand_constant): Updated function description.
4218 2007-09-27 Jason Merrill <jason@redhat.com>
4221 * decl2.c (is_late_template_attribute): Don't crash on unknown
4224 2007-09-27 Paolo Carlini <pcarlini@suse.de>
4227 * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
4228 * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
4229 spaces in the formatting.
4230 * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
4232 2007-09-27 Jakub Jelinek <jakub@redhat.com>
4234 * error.c (cxx_print_error_function): Add third argument, pass
4235 it over to lhd_print_error_function.
4236 (cp_print_error_function): If diagnostic->abstract_origin, print
4238 * cp-tree.h (struct diagnostic_info): New forward decl.
4239 (cxx_print_error_function): Add third argument.
4241 2007-09-25 Simon Martin <simartin@users.sourceforge.net>
4244 * name-lookup.c (pushtag): Do not create an implicit typedef before
4245 the associated type declaration is known to be valid.
4247 2007-09-25 Jakub Jelinek <jakub@redhat.com>
4249 * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
4250 rather than pointers.
4252 2007-09-24 Danny Smith <dannysmith@user.sourceforge.net>
4255 * search.c (check_final_overrider): Fail if
4256 targetm.comp_type_attributes returns 0.
4258 2007-09-24 Jason Merrill <jason@redhat.com>
4261 * pt.c (resolve_typename_type): Don't look things up in the original
4262 template if it would mean losing template arguments.
4264 2007-09-24 Jakub Jelinek <jakub@redhat.com>
4267 * cp-tree.h (cxx_type_hash_eq): New prototype.
4268 * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
4269 * tree.c (cxx_type_hash_eq): New function.
4271 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
4274 * tree.c (cp_build_qualified_type_real): Build a canonical
4275 ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
4277 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
4281 * tree.c (cplus_array_compare): Compare pointers, not types.
4282 (build_cplus_array_type_1): Store new array type into the hash
4283 table before building the canonical type; build the canonical type
4285 (cp_build_qualified_type_real): Put all of the array types with
4286 cv-qualified element types into the C++ array hash table, built as
4287 variants of the unqualified versions.
4289 2007-09-23 Jason Merrill <jason@redhat.com>
4292 * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
4293 for deprecation warnings.
4295 2007-09-22 Jason Merrill <jason@redhat.com>
4298 * call.c (build_over_call): Warn about deprecated virtuals.
4301 * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
4302 (MAYBE_TAGGED_TYPE_P): Remove.
4303 * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
4304 instead of calling is_late_template_attribute again.
4305 (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
4306 (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
4307 Don't crash on typedefs from non-template classes.
4308 * decl2.c (grokfield): Don't sorry about attrs on template parms.
4309 (is_late_template_attribute): All attributes applied to template
4310 parms or typename types are dependent. Static.
4311 (splice_template_attributes): Pass decl through.
4312 (save_template_attributes): Likewise.
4314 2007-09-20 Jakub Jelinek <jakub@redhat.com>
4317 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
4318 returned from tsubst_pack_expansion.
4319 (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
4320 (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
4322 2007-09-20 Paolo Carlini <pcarlini@suse.de>
4325 * semantics.c (finish_id_expression): Use consistently
4326 context_for_name_lookup.
4327 * decl.c (fixup_anonymous_aggr): Fix error message for
4328 anonymous struct (vs union).
4330 2007-09-19 Jason Merrill <jason@redhat.com>
4333 * pt.c (tsubst): Handle typedefs by looking for the specialization.
4334 (retrieve_specialization): Only tagged types use
4335 DECL_TEMPLATE_INSTANTIATIONS.
4336 (instantiate_class_template): Push nested classes too.
4337 (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
4339 * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
4340 * init.c (is_aggr_type): Remove redundant tests.
4341 * class.c (push_nested_class): Use CLASS_TYPE_P.
4343 2007-09-20 Paolo Carlini <pcarlini@suse.de>
4346 * init.c (build_zero_init): If, recursively, build_zero_init
4347 returns a NULL_TREE, do not append it to the VEC of constructors.
4349 2007-09-18 Jason Merrill <jason@redhat.com>
4352 * pt.c (apply_late_template_attributes): Set processing_template_decl.
4353 (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
4354 ATTR_FLAG_TYPE_IN_PLACE.
4355 (tsubst): Do unqualified lookup to find typedefs from current class.
4356 [ARRAY_TYPE]: Propagate alignment info.
4357 * decl2.c (is_late_template_attribute): Only defer handling of
4358 attribute aligned if the expression is dependent.
4359 (save_template_attributes): If we're deferring any attributes,
4360 make this a naming typedef.
4362 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4364 PR c++/33462 (again)
4365 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
4366 va_arg instead of __builtin_va_arg.
4368 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4371 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
4372 (pp_cxx_primary_expression): Use it.
4373 * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
4374 * error.c (dump_expr): Use it.
4376 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4379 * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
4380 out case TYPEID_EXPR to...
4381 (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
4382 and pp_cxx_right_paren.
4383 * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
4384 * error.c (dump_expr): Use it.
4386 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4389 * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
4390 (pp_cxx_primary_expression): Use it.
4391 * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
4392 * error.c (dump_expr): Use it.
4394 2007-09-16 Paolo Carlini <pcarlini@suse.de>
4397 * init.c (build_new): Remove warning for zero-element
4400 2007-09-16 Nathan Sidwell <nathan@codesourcery.com>
4403 * call.c (maybe_handle_implicit_object): Set this_p, clear
4404 rvaluedness_matches_p.
4405 (compare_ics): Do not compare rvaluedness matching when one of the
4406 operands is an implicit object.
4408 2007-09-14 Jason Merrill <jason@redhat.com>
4410 PR c++/17743, c++/19163
4411 * decl2.c (is_late_template_attribute): New fn.
4412 (splice_template_attributes, save_template_attributes): New fns.
4413 (cplus_decl_attributes): Call save_template_attributes.
4414 * pt.c (apply_late_template_attributes): New fn.
4415 (instantiate_class_template, tsubst_decl): Use it.
4416 * cp-tree.h: Declare is_late_template_attribute.
4418 2007-09-13 Tom Tromey <tromey@redhat.com>
4420 * parser.c (cp_lexer_new_main): Don't use
4421 c_lex_return_raw_strings.
4422 (cp_lexer_get_preprocessor_token): Update. Add special case when
4425 2007-09-11 Jan Hubicka <jh@suse.cz>
4427 * method.c (use_thunk): Use tree_rest_of_compilation
4428 * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
4429 (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
4430 * cp-tree.h (expand_body): Kill.
4431 (emit_associated_thunks): Declare.
4432 * semantics.c (emit_associated_thunks): Export.
4433 (expand_body): Kill.
4435 2007-09-09 David Daney <ddaney@avtrex.com>
4438 * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
4439 to calculate cookie_ptr.
4441 2007-09-08 Jason Merrill <jason@redhat.com>
4444 * pt.c (most_specialized_class): Set processing_template_decl
4445 while tsubsting partial spec args.
4447 2007-09-06 Jason Merrill <jason@redhat.com>
4449 * decl2.c (get_guard): Copy visibility from the guarded variable.
4451 2007-09-06 Jan Hubicka <jh@suse.cz>
4453 * semantics.c (expand_body): Do not mark arguments of clones used.
4455 2007-09-06 Paolo Carlini <pcarlini@suse.de>
4458 * decl.c (cp_finish_decl): When processing_template_decl,
4459 deal correctly with init as TREE_LIST.
4461 2007-09-06 Tom Tromey <tromey@redhat.com>
4463 * decl.c (finish_function): Put return's location on line zero of
4466 2007-09-05 Jason Merrill <jason@redhat.com>
4469 * except.c (prepare_eh_type): Use type_decays_to.
4472 * init.c (build_delete): Use build_headof to get the address of the
4473 complete object if we aren't using the deleting destructor.
4474 * rtti.c (build_headof): No longer static.
4475 * cp-tree.h: Declare it.
4477 2007-09-06 Jakub Jelinek <jakub@redhat.com>
4479 * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
4480 decl if a prototype for XX is provided with throw().
4483 * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
4484 on __*_chk non-__builtin_* decls.
4486 2007-09-05 Paolo Carlini <pcarlini@suse.de>
4489 * semantics.c (finish_id_expression): Use context_for_name_lookup
4490 insted of DECL_CONTEXT, to see through anonymous structs and unions.
4491 * class.c (finish_struct_anon): Deal correctly with anonymous
4492 structs (vs unions, as GNU extension) in error messages.
4494 2007-09-05 Jan Hubicka <jh@suse.cz>
4496 * sematics.c (expand_body): Remove unnecesary import_export_decl
4497 call, DECL_EXTERNAL checks and current_function_decl saving.
4499 2007-09-05 Paolo Carlini <pcarlini@suse.de>
4501 PR c++/29731 (again)
4502 * parser.c (cp_parser_primary_expression): Return error_mark_node
4503 when a statement-expression is found in a template-argument list.
4505 2007-09-04 Jason Merrill <jason@redhat.com>
4507 * except.c (initialize_handler_parm): Use
4508 fold_build_cleanup_point_expr.
4511 * call.c (reference_binding): Don't look for user-defined conversions
4515 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
4516 the MUST_NOT_THROW_EXPR.
4518 2007-09-04 Richard Sandiford <richard@codesourcery.com>
4520 * decl.c (cp_finish_decl): Call determine_visibility before
4521 make_rtl_for_nonlocal_decl.
4523 2007-09-04 Jason Merrill <jason@redhat.com>
4526 * pt.c (most_specialized_class): Substitute outer template
4527 arguments into the arguments of a member template partial
4529 (strip_innermost_template_args): New fn.
4531 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
4533 * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
4535 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4537 * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
4538 * decl.c (cp_make_fname_decl): Likewise,
4539 * parser.c (cp_parser_string_literal): Likewise,
4540 * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
4541 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
4544 2007-09-02 Paolo Carlini <pcarlini@suse.de>
4547 * typeck.c (build_unary_op): Fix error message for
4548 Boolean expression as operand to operator--.
4550 2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4552 * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
4553 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
4556 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
4559 * init.c (build_default_init): Make extern.
4560 * cp-tree.h (build_default_init): Declare here.
4561 * pt.c (tsubst_expr): When the instantiation of the initializer of
4562 a variable results in an empty list, default-initialize the
4564 (tsubst_copy_and_build): When the instantiation of the initializer
4565 in a new expression results in an empty initializer list,
4566 default-initialize it.
4568 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
4570 * mangle.c (write_type): Change mangling of rvalue reference from
4573 2007-08-31 Jakub Jelinek <jakub@redhat.com>
4575 * decl.c (duplicate_decls): Remove duplicated line.
4577 2007-08-31 Paolo Carlini <pcarlini@suse.de>
4580 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
4581 BOUND_TEMPLATE_TEMPLATE_PARM.
4583 2007-08-31 Paolo Carlini <pcarlini@suse.de>
4586 * search.c (lookup_member): Check the name argument for
4589 2007-08-31 Paolo Carlini <pcarlini@suse.de>
4592 * parser.c (cp_parser_trait_expr): Check rerurn value of
4595 2007-08-30 Ollie Wild <aaw@google.com>
4597 * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
4598 convert_ptrmem for pointer to member conversions.
4599 (convert_to_pointer_force): Update cp_convert_to_pointer call.
4600 (ocp_convert): Update cp_convert_to_pointer call.
4601 * typeck.c (convert_ptrmem): Add conditional for null pointers to
4603 (build_static_cast_1): Check can_convert for conversions in either
4605 (get_delta_difference_1): New function.
4606 (get_delta_difference): Refactor to call get_delta_difference_1.
4608 2007-08-30 Jakub Jelinek <jakub@redhat.com>
4610 * decl.c (start_preparsed_function): Set
4611 DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
4613 2007-08-28 Paolo Carlini <pcarlini@suse.de>
4616 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
4617 BOUND_TEMPLATE_TEMPLATE_PARM.
4619 2007-08-28 Jakub Jelinek <jakub@redhat.com>
4623 * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
4624 and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
4626 2007-08-27 Jason Merrill <jason@redhat.com>
4629 * pt.c (build_non_dependent_expr, type_dependent_expression_p):
4630 Look inside STMT_EXPR.
4631 * semantics.c (stmt_expr_value_expr): New fn.
4632 * cp-tree.h: Declare it.
4635 * decl.c (groktypename): Ignore attributes applied to class type.
4637 2007-08-28 Richard Guenther <rguenther@suse.de>
4639 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
4641 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
4643 * error.c (dump_expr): Handle COMPLEX_CST.
4644 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
4645 (pp_cxx_expression): Likewise.
4647 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
4649 * decl.c (GNU_INLINE_P): New.
4650 (duplicate_decls): Handle gnu_inline. Merge attributes and
4651 some flags in overriding definitions.
4652 (redeclaration_error_message): Handle gnu_inline.
4653 (start_preparsed_function): Likewise.
4655 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4657 * call.c (sufficient_parms_p): Constify.
4658 * class.c (same_signature_p): Likewise.
4659 * cp-gimplify.c (is_invisiref_parm,
4660 cxx_omp_privatize_by_reference): Likewise.
4661 * cp-objcp-common.c (has_c_linkage): Likewise.
4662 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
4663 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
4664 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
4665 num_artificial_parms_for, comp_template_parms,
4666 template_parameter_pack_p, any_dependent_template_arguments_p,
4667 any_type_dependent_arguments_p, any_value_dependent_elements_p,
4668 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
4669 zero_init_p, member_p, cp_lvalue_kind,
4670 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
4671 varargs_function_p, is_dummy_object, special_function_kind,
4672 string_conv_p, type_unknown_p, comp_except_specs, compparms,
4673 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
4674 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
4675 cp_has_mutable_p, at_least_as_qualified_p,
4676 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
4677 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
4678 * except.c (nothrow_libfn_p): Likewise.
4679 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
4681 * pt.c (comp_template_parms, template_parameter_pack_p,
4682 any_type_dependent_arguments_p, any_value_dependent_elements_p,
4683 any_dependent_template_arguments_p): Likewise.
4684 * repo.c (repo_export_class_p): Likewise.
4685 * semantics.c (anon_aggr_type_p): Likewise.
4686 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
4687 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
4688 varargs_function_p, member_p, is_dummy_object, pod_type_p,
4689 zero_init_p, special_function_p): Likewise.
4690 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
4691 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
4692 compparms, invalid_nonstatic_memfn_p,
4693 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
4694 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
4695 cp_has_mutable_p, lvalue_or_else): Likewise.
4697 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
4699 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
4700 * cp-objcp-common.c (cp_tree_size): Ditto.
4701 * tree.c (cp_walk_subtrees): Ditto
4702 * cp-tree.def (TINST_LEVEL): Go away.
4703 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
4704 move together with other non-tree structs.
4705 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
4706 (union lang_tree_node): Eliminate tinst_level field.
4707 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
4708 (current_instantiation, outermost_tinst_level): Return
4709 a "struct tinst_level *".
4711 * error.c (print_instantiation_partial_context): Change second
4712 parameter to a "struct tinst_level *". Replace accessor macros
4714 (print_instantiation_full_context): Likewise.
4715 * lex.c (in_main_input_context): Likewise.
4717 * pt.c (struct pending_templates): New.
4718 (pending_templates, last_pending_template): Use it as a type.
4719 (current_tinst_level): Change typo to "struct tinst_level *"
4720 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
4721 (add_pending_template): Construct a "struct pending_template".
4722 Replace TINST_LEVEL accessor macros with field access.
4723 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
4724 (pop_tinst_level): Likewise.
4725 (instantiate_pending_templates): Likewise. Factor common code used
4726 when an instantiation has been done.
4727 (outermost_tinst_level): Replace tree_last with loop.
4728 (current_instantiation): Return a "struct tinst_level *".
4730 2007-08-24 Ollie Wild <aaw@google.com>
4732 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
4733 * name-lookup.h (cp_binding_level): Remove vtables member.
4735 2007-08-24 Richard Guenther <rguenther@suse.de>
4737 * tree.c (cp_cannot_inline_tree_fn): Remove.
4738 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
4739 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
4742 2007-08-24 Jakub Jelinek <jakub@redhat.com>
4745 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
4746 error_mark_node right away if build_expr_type_conversion
4750 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
4751 is error_mark_node rather than NULL_TREE.
4752 * pt.c (check_explicit_specialization): Likewise.
4755 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
4756 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
4758 2007-08-22 Jason Merrill <jason@redhat.com>
4761 * pt.c (outermost_tinst_level): New function.
4762 * lex.c (in_main_input_context): New function.
4763 * cp-tree.h: Declare it.
4764 * decl2.c (constrain_class_visibility): Use it to avoid warning
4765 about uses of the anonymous namespace in the main input file.
4767 2007-08-21 Jakub Jelinek <jakub@redhat.com>
4769 * init.c (build_new_1): Use get_target_expr instead of save_expr.
4771 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
4774 * class.c (finish_struct_1): Warn when a class has virtual
4775 functions and accessible non-virtual destructor.
4777 2007-08-20 Richard Guenther <rguenther@suse.de>
4781 * call.c (build_new_method_call): Convert initializer to
4783 * init.c (build_aggr_init): Do not fiddle with types.
4784 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
4785 * except.c (build_throw): Do not drop qualifiers for the
4787 * typeck.c (get_member_function_from_ptrfunc): Do not
4788 fiddle with types, instead convert.
4789 (build_ptrmemfunc1): Convert to the target type for
4791 (gfc_trans_allocate): Convert result to target type.
4792 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
4793 pointer-to-member structures shall have alias set zero as well.
4795 2007-08-20 Richard Guenther <rguenther@suse.de>
4797 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
4799 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
4800 (nonstatic_local_decl_p): Likewise.
4801 * tree.c (cp_auto_var_in_fn_p): Remove.
4802 * decl.c (nonstatic_local_decl_p): Remove.
4804 2007-08-20 Richard Guenther <rguenther@suse.de>
4806 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
4808 * tree.h (cp_walk_tree): New define to walk_tree_1 with
4809 cp_walk_subtrees lh parameter.
4810 (cp_walk_tree_without_duplicates): New define to
4811 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
4812 * tree.c (count_trees): Call
4813 cp_walk_tree_without_duplicates.
4814 (verify_stmt_tree): Call cp_walk_tree.
4815 (break_out_target_exprs): Likewise.
4816 (WALK_SUBTREE): Likewise.
4817 * cp-gimplify.c (cp_genericize): Likewise.
4818 * cp-pt.c (find_parameter_packs_r): Likewise.
4819 (uses_parameter_packs): Likewise.
4820 (make_pack_expansion): Likewise.
4821 (check_for_bare_parameter_packs): Likewise.
4822 (for_each_template_parm): Likewise.
4823 * decl.c (check_default_argument): Call
4824 cp_walk_tree_without_duplicates.
4825 * except.c (build_throw): Likewise.
4826 * decl2.c (type_visibility): Likewise.
4827 * semantics.c (expand_or_defer_fn): Likewise.
4828 (finalize_nrv): Call cp_walk_tree.
4830 2007-08-20 Jakub Jelinek <jakub@redhat.com>
4833 * init.c (build_new_1): Rename placement_var variable to placement_expr.
4834 Initialize it with save_expr rather than get_temp_regvar.
4836 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
4839 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
4842 2007-08-17 Ollie Wild <aaw@google.com>
4845 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
4846 declarations into appropriate slots for comparison. Fix type
4849 2007-08-17 Paolo Carlini <pcarlini@suse.de>
4852 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
4853 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
4855 2007-08-17 Paolo Carlini <pcarlini@suse.de>
4858 * parser.c (cp_parser_class_head): Improve error message.
4860 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
4862 * pt.c (instantiate_decl): Set input_location
4863 for the function end.
4865 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4867 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
4869 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
4870 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
4871 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
4872 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
4873 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
4874 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
4875 * typeck.c (cp_type_quals): Likewise.
4876 * typeck2.c (cxx_incomplete_type_diagnostic,
4877 cxx_incomplete_type_error): Likewise.
4879 2007-08-16 Paolo Carlini <pcarlini@suse.de>
4882 * pt.c (tsubst_friend_function): When check_classfn
4883 returns error_mark_node likewise return it.
4885 2007-08-15 Jakub Jelinek <jakub@redhat.com>
4888 * typeck.c (check_return_expr): Don't NRV optimize vars in
4890 * decl.c (finish_function): Comment fix.
4892 2007-08-15 Paolo Carlini <pcarlini@suse.de>
4895 * pt.c (push_template_decl_real): Depending on TYPE_P
4896 use either TYPE_CONTEXT or DECL_CONTEXT.
4898 2007-08-14 Mark Mitchell <mark@codesourcery.com>
4900 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
4901 constructors and destructors return this.
4903 2007-08-14 Paolo Carlini <pcarlini@suse.de>
4906 * decl2.c (check_classfn): Return error_mark_node in case of error;
4907 in that case, do not call add_method.
4908 * decl.c (start_decl): Deal with check_classfn returning
4910 (grokfndecl): Likewise.
4911 * pt.c (tsubst_friend_function): Likewise.
4913 2007-08-14 Andrew Pinski <pinskia@gmail.com>
4916 * typeck.c (build_binary_op): Disallow vector float types with
4917 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
4919 2007-08-11 Ian Lance Taylor <iant@google.com>
4921 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
4923 * cp-tree.h (cxx_get_alias_set): Update declaration.
4925 2007-08-10 Ollie Wild <aaw@google.com>
4927 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
4929 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
4931 (unqualified_namespace_lookup): Fix ambiguous_decl call.
4932 (lookup_using_namespace): Fix ambiguous_decl call.
4933 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
4935 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4937 * call.c (name_as_c_string): Use CONST_CAST.
4938 * decl.c (build_decl): Likewise.
4939 * parser.c (cp_parser_string_literal): Likewise.
4941 2007-08-10 Paolo Carlini <pcarlini@suse.de>
4944 * error.c (dump_expr): Consistently use the *_cxx_*
4945 variants of the pretty-print functions.
4947 2007-08-10 Paolo Carlini <pcarlini@suse.de>
4950 * decl.c (check_special_function_return_type): Just error
4951 on return type specified for conversion operator.
4953 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
4955 * typeck2.c (readonly_error): Handle general expressions.
4956 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
4958 2007-08-06 Dan Hipschman <dsh@google.com>
4960 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
4961 access function name.
4963 2007-08-04 Alfred Minarik <a.minarik@aon.at>
4966 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
4967 * g++spec.c (lang_specific_driver): Check them.
4969 2007-08-06 Paolo Carlini <pcarlini@suse.de>
4972 * pt.c (inline_needs_template_parms): Fix comment; change return type
4975 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
4978 2007-03-26 Dirk Mueller <dmueller@suse.de>
4980 * parser.c (cp_parser_member_declaration): Pedwarn
4981 about stray semicolons after member declarations.
4983 2007-08-02 Lee Millward <lee.millward@gmail.com>
4988 * parser.c (cp_parser_asm_definition): Detect and discard asm
4989 statements with invalid inputs or outputs.
4990 (cp_parser_asm_operand_list): Return error mark node if any
4991 of the operands are invalid. Adjust documentation.
4993 2007-08-02 Nick Clifton <nickc@redhat.com>
4995 * typeck.c: Change copyright header to refer to version 3 of the
4996 GNU General Public License and to point readers at the COPYING3
4997 file and the FSF's license web page.
4998 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
4999 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
5000 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
5001 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
5002 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
5003 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
5004 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
5005 name-lookup.h, parser.c: Likewise.
5007 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5010 * call.c (magic_varargs_p): Honor the "type generic" attribute.
5012 2007-07-30 Paolo Carlini <pcarlini@suse.de>
5015 * semantics.c (finish_label_stmt): Reject the __label__
5016 extension outside function scopes.
5018 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5020 * parser.c (eof_token): Un-constify.
5021 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
5022 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
5025 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
5027 * pt.c, tree.c, typeck2.c: Fix comment typos.
5029 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
5030 Mark Mitchell <mark@codesourcery.com>
5033 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
5034 hidden due to friend declarations in local classes.
5036 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
5038 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
5039 * cp-tree.def (DECLTYPE_TYPE): New.
5040 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
5041 (dump_type_prefix): Ditto.
5042 (dump_type_suffix): Ditto.
5043 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
5044 * mangle.c (write_type): Handle DECLTYPE_TYPE.
5045 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
5047 (DECLTYPE_TYPE_EXPR): New.
5048 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
5049 (finish_declared_type): Declare.
5050 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
5051 DECLTYPE_TYPE nodes.
5052 (pp_cxx_type_id): Ditto.
5053 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
5054 (tsubst): Substitute into a DECLTYPE_TYPE node.
5055 (tsubst_copy): Ditto.
5056 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
5058 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
5059 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
5060 structural equality (because we can't hash the expressions).
5061 (finish_declared_type): New.
5062 * lex.c (reswords): Add "decltype" keyword.
5063 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
5064 (cp_parser_postfix_expression): Add member_access_only_p to
5065 restrict postfix expression to member access expressions.
5066 (cp_parser_unary_expression): Update call to
5067 cp_parser_postfix_expression to reflect new parameter.
5068 (cp_parser_declared_type): New.
5069 (cp_parser_simple_type_specifier): Parse decltype types.
5071 2007-07-27 Mark Mitchell <mark@codesourcery.com>
5074 * call.c (convert_for_arg_passing): Only widen bitfields to their
5075 declared types if necessary.
5077 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5079 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
5082 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5084 * decl.c (typename_hash, typename_compare): Constify.
5085 * mangle.c (hash_type, compare_type): Likewise.
5086 * pt.c (eq_local_specializations, hash_local_specialization):
5088 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
5089 list_hash): Likewise.
5090 * typeck2.c (pat_compare): Likewise.
5092 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
5094 * method.c (implicitly_declare_fn): Increase alignment if member
5095 function pointer format requires it.
5097 2007-07-24 Paolo Carlini <pcarlini@suse.de>
5100 * typeck.c (check_return_expr): Do not pass a null argument
5103 2007-07-24 Paolo Carlini <pcarlini@suse.de>
5106 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
5109 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
5112 * typeck.c (convert_arguments): Only use default args if we have
5116 * typeck.c (structural_comptypes): No need to check
5117 resolve_typename_type return value here.
5118 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
5119 * pt.c (resolve_typename_type): Follow typename typedefs. Return
5120 original type rather than error_mark_node in case of failure.
5121 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
5122 resolve_typename_type result check.
5123 (cp_parser_direct_declarator, cp_parser_head,
5124 cp_parser_constructor_declarator_p): Likewise.
5126 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
5128 * pt.c (template_parms_variadic_p): Remove.
5129 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
5131 2007-07-12 Jakub Jelinek <jakub@redhat.com>
5134 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
5135 argument to dump_aggr_init_expr_args instead of false.
5137 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
5139 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
5140 canonical types; otherwise, fall back to structural type
5141 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
5142 internal compiler error if the canonical types are wrong.
5144 2007-07-11 Paolo Carlini <pcarlini@suse.de>
5147 * parser.c (cp_parser_make_indirect_declarator): When the
5148 the code argument is ERROR_MARK return cp_error_declarator.
5150 2007-07-09 Geoffrey Keating <geoffk@apple.com>
5153 * decl.c (cxx_init_decl_processing): Don't set
5154 force_align_functions_log.
5155 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
5156 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
5157 FUNCTION_DECL, return its alignment.
5159 2007-07-09 Richard Guenther <rguenther@suse.de>
5161 * decl.c (start_preparsed_function): Do not promote return type.
5163 2007-07-08 Paolo Carlini <pcarlini@suse.de>
5166 * pt.c (unify): Never pass error_mark_node to template_decl_level.
5168 2007-07-07 Mark Mitchell <mark@codesourcery.com>
5171 * pt.c (resolve_overloaded_unification): Robustify. Return a
5173 (type_unification_real): Adjust accordingly.
5175 2007-07-06 Richard Guenther <rguenther@suse.de>
5177 * init.c (build_new_1): Use the correct pointer type.
5178 * typeck2.c (build_m_component_ref): Likewise.
5180 2007-07-05 Mark Mitchell <mark@codesourcery.com>
5183 * init.c (build_zero_init): Always build an initializer for
5185 * typeck2.c (build_functional_cast): Use build_zero_init.
5188 * init.c (build_new_1): Always pass the allocation function to
5189 build_op_delete_call.
5190 * call.c (build_op_delete_call): Handle operator delete with a
5191 variable-argument list. Do not issue an error when no matching
5192 deallocation function is available for a new operator.
5195 * cp-tree.h (any_value_dependent_elements_p): Declare it.
5196 * decl.c (value_dependent_init_p): New function.
5197 (cp_finish_decl): Use it.
5198 * pt.c (value_dependent_expression_p): Use
5199 any_value_dependent_elements_p.
5200 * parser.c (cp_parser_primary_expression): Add comment about
5201 treating dependent qualified names as integral
5202 constant-expressions.
5204 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
5206 * decl.c (build_ptrmemfunc_type): Always use structural equality
5207 tests when comparing pointer-to-member-function types, because the
5208 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
5211 2007-07-03 Mark Mitchell <mark@codesourcery.com>
5213 * init.c (build_new): Tweak comment.
5215 2007-06-29 Dave Brolley <brolley@redhat.com>
5218 * parser.c (cp_parser_new_type_id): Don't reduce a named array
5219 type to its base type and number of elements here.
5220 * init.c (build_new): Call complete_type_or_else to ensure that the
5221 type is complete and to issue a diagnostic if it is not.
5222 (build_new_1): Don't call complete_type_or_else here.
5224 2007-07-03 Richard Guenther <rguenther@suse.de>
5227 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
5230 2007-07-02 Simon Baldwin <simonb@google.com>
5232 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
5233 for inner-style nested forward declarations that don't declare
5236 2007-07-02 Jakub Jelinek <jakub@redhat.com>
5239 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
5240 DECL_P in not a variable and appears more than once error messages.
5242 2007-07-01 Ollie Wild <aaw@google.com>
5244 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
5245 (select_decl): Remove function.
5246 (unqualified_namespace_lookup): Populate binding by calling
5247 ambiguous_decl. Remove select_decl call.
5248 (lookup_qualified_name): Remove select_decl call.
5249 * decl.c (lookup_and_check_tag): Check for ambiguous references.
5250 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
5251 generation when name lookup is ambiguous.
5253 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
5256 * init.c (build_new_1): Use structural equality on the copy of the
5259 2007-06-28 Geoffrey Keating <geoffk@apple.com>
5261 * decl2.c (determine_visibility): Implement
5262 flag_visibility_ms_compat effect on type info.
5263 * decl.c (cxx_init_decl_processing): Implement
5264 global effect of flag_visibility_ms_compat.
5266 2007-06-28 Geoffrey Keating <geoffk@apple.com>
5268 * decl2.c (start_objects): Mark constructor-running function
5271 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
5274 * decl.c (grokdeclarator): Reset friendp for member functions declared
5275 friend of their own class.
5277 2007-06-23 Mark Mitchell <mark@codesourcery.com>
5279 * decl2.c (determine_visibility): Don't look for dllexport here.
5280 (determine_visibility_from_class): Tidy.
5282 2007-06-18 Simon Baldwin <simonb@google.com>
5285 * parser.c (cp_parser_single_declaration): Added check for storage
5286 class other than sc_none in parsed declaration, and a flag to indicate
5287 if the call is part of an explicit template specialization parse.
5288 * (cp_parser_explicit_specialization): Specialization check flag added
5289 to call to cp_parser_single_declaration(), set true.
5290 * (cp_parser_template_declaration_after_export): Specialization check
5291 flag added to call to cp_parser_single_declaration(), set false.
5292 * pt.c (check_explicit_specialization): Added code to copy visiblity
5293 and linkage from the templated function to the explicit specialization.
5295 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
5297 * typeck.c (build_binary_op): For templates build the
5298 expression in pieces to avoid the assert in build2_stat.
5299 (get_member_function_from_ptrfunc):
5300 Change over to using POINTER_PLUS_EXPR and convert
5301 the second operand to sizetype.
5302 * typeck2.c (build_m_component_ref): Likewise.
5303 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
5304 instead of PLUS_EXPR for pointers.
5305 (build_new_1): Likewise.
5306 (build_vec_delete_1): Likewise.
5307 (build_vec_delete): Likewise.
5308 * class.c (build_base_path): Likewise.
5309 (build_base_path): Likewise.
5310 (convert_to_base_statically): Likewise.
5311 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
5312 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
5313 instead of PLUS_EXPR.
5314 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
5315 instead of PLUS_EXPR for pointers.
5316 * call.c (build_special_member_call): Likewise.
5317 * rtti.c (build_headof): Likewise.
5318 Use sizetype instead of ptrdiff_type_node.
5319 (tinfo_base_init): Create a POINTER_PLUS_EXPR
5320 instead of PLUS_EXPR for pointers.
5321 * except.c (expand_start_catch_block): Do a
5322 NEGATIVE and then a POINTER_PLUS_EXPR instead
5324 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
5325 PLUS_EXPR on pointer types over to use
5326 POINTER_PLUS_EXPR and remove the conversion
5327 to the pointer types.
5328 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
5329 adding to a pointer type. Use size_int instead of
5330 ssize_int. Convert the index to sizetype before
5331 adding it to the pointer.
5333 2007-06-15 Mark Mitchell <mark@codesourcery.com>
5335 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
5336 (DECL_ANON_UNION_VAR_P): New macro.
5337 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
5338 than DECL_VAR_MARKED_P, to keep track of which variables we have
5340 * decl.c (redeclaration_error_message): Complain about redeclaring
5341 anonymous union members at namespace scope.
5342 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
5344 2007-06-14 Geoff Keating <geoffk@apple.com>
5346 * decl2.c (determine_visibility): Ensure that functions with
5347 hidden types as parameters are hidden.
5350 * decl2.c (determine_visibility): Remove duplicate code for
5353 2007-06-12 Ian Lance Taylor <iant@google.com>
5356 * init.c (avoid_placement_new_aliasing): New static function.
5357 (build_new_1): Call it.
5359 2007-06-11 Rafael Ávila de Espíndola <espindola@google.com>
5361 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
5362 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
5364 2007-06-08 Jakub Jelinek <jakub@redhat.com>
5367 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
5368 on init, the non-decl cond operand and increment value.
5370 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
5373 * decl.c (check_initializer): Report an error when a brace enclosed
5374 initializer is used for a non-aggregate type in C++98.
5375 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
5377 (grokdeclarator): Likewise.
5378 (move_fn_p): Likewise.
5379 * typeck.c (check_return_expr): Likewise.
5380 * call.c (reference_binding): Likewise.
5381 * error.c (cp_cpp_error): Likewise.
5382 * pt.c (check_default_tmpl_args): Likewise.
5384 * lex.c (init_reswords): Likewise.
5385 * parser.c (p_parser_primary_expression): Likewise.
5386 (TOKEN_PRECEDENCE): Likewise.
5387 (cp_parser_init_declarator): Likewise.
5388 (cp_parser_ptr_operator): Likewise.
5389 (cp_parser_parameter_declaration): Likewise.
5390 (cp_parser_enclosed_template_argument_list): Likewise.
5391 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
5392 (cp_parser_next_token_ends_template_argument_p): Likewise.
5394 2007-06-04 Simon Baldwin <simonb@google.com>
5396 * decl.c (grokdeclarator): Readability change. Moved case labels
5397 into direct switch statement scope.
5399 2007-06-04 Paolo Carlini <pcarlini@suse.de>
5401 * call.c (convert_like_real): Remove pointless code.
5403 2007-05-31 Mark Mitchell <mark@codesourcery.com>
5405 * decl.c (get_atexit_fn_ptr_type): New function.
5406 (get_atexit_node): Use it.
5407 (start_cleanup_fn): Likewise.
5408 (register_dtor_fn): Use the object's destructor, instead of a
5409 separate cleanup function, where possible.
5410 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
5411 (atexit_fn_ptr_type_node): New macro.
5412 * decl2.c (build_cleanup): Use build_address.
5414 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
5416 * typeck.c (build_binary_op): Include types in error.
5418 2007-05-31 Jakub Jelinek <jakub@redhat.com>
5421 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
5422 needs runtime initialization.
5424 2007-05-31 Paolo Carlini <pcarlini@suse.de>
5427 * semantics.c (finish_trait_expr): Complete the types.
5429 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
5430 Douglas Gregor <doug.gregor@gmail.com>
5431 Pedro Lamarao <pedro.lamarao@mndfck.org>
5432 Howard Hinnant <howard.hinnant@gmail.com>
5436 * typeck.c (comptypes): Don't consider rvalue and lvalue
5437 reference types to be equivalent.
5438 (check_return_expr): Move from certain lvalues when returning
5440 * decl.c (grokdeclarator): Implement reference collapsing.
5441 (copy_fn_p): Don't consider constructors taking rvalue references
5442 to be copy constructors.
5444 * call.c (conversion): New "rvaluedness_matches_p" member.
5445 (convert_class_to_reference): Require reference type as first
5446 parameter instead of base type.
5447 (reference_binding): Add logic to handle rvalue references.
5448 (implicit_conversion): Update inaccurate comment.
5449 (convert_like_real): Disable creation of temporaries that are
5450 impossible to initialize for types with move constructors.
5451 (build_over_call): Elide move constructors when possible.
5452 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
5453 (maybe_handle_ref_bind): Return conversion instead of type node.
5454 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
5455 determine preferred conversion sequences.
5456 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
5457 (LOOKUP_PREFER_RVALUE): New.
5458 (DECL_MOVE_CONSTRUCTOR_P): New.
5459 (struct cp_declarator): Add "reference" member for reference
5460 types, with new "rvalue_ref" flag.
5461 (cp_build_reference_type): Declare.
5462 (move_fn_p): Declare.
5463 * error.c (dump_type_prefix): Format rvalue reference types
5464 correctly in error messages.
5465 * except.c (build_throw): Move from certain lvalues when
5467 * mangle.c (write_type): Mangle rvalue references differently
5468 than regular references.
5469 * parser.c (make_reference_declarator): Add boolean parameter for
5471 (cp_parser_make_indirect_declarator): New.
5472 (cp_parser_new_declarator_opt): Call
5473 cp_parser_make_indirect_declarator.
5474 (cp_parser_conversion_declarator_opt): Ditto.
5475 (cp_parser_declarator): Ditto.
5476 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
5478 * pt.c (tsubst): Implement reference collapsing.
5479 (maybe_adjust_types_for_deduction): Implement special template
5480 parameter deduction rule for rvalue references.
5481 (type_unification_real): Update calls to
5482 maybe_adjust_types_for_deduction.
5483 (try_one_overload): Ditto.
5484 (unify_pack_expansion): Ditto.
5485 * tree.c (lvalue_p_1): Handle rvalue reference types.
5486 (cp_build_reference_type): New.
5488 2007-05-30 Jakub Jelinek <jakub@redhat.com>
5491 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
5492 variables that need runtime initialization.
5494 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
5497 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
5498 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
5499 case POSTDECREMENT_EXPR>): Return the error_mark_node
5500 if either the real or imaginary parts would an
5503 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
5504 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5507 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
5508 token is a closing brace, false if there are no tokens left.
5509 (cp_parser_namespace_alias_definition): Only consume the next token if
5510 it is a closing brace.
5512 * parser.c (cp_parser_class_specifier): Likewise.
5514 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
5516 * semantics.c (finish_member_declaration): Fix a typo in the
5519 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
5531 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
5532 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
5533 * pt.c (check_for_bare_parameter_packs): Return bool indicated
5534 whether everything was okay. Fix indentation.
5535 (push_template_decl_real): Check for bare parameter packs in
5536 function parameters; where errors occur, mark the parameter types
5537 with ERROR_MARK_NODEs to avert ICEs.
5538 (coerce_template_parameter_pack): New.
5539 (coerce_template_parms): Moved parameter pack coercion into
5540 coerce_template_parameter_pack, and permit it anywhere in the
5541 template parameter list (not just at the end). Parameter and
5542 argument indices can vary (somewhat) separately now, so add
5543 PARM_IDX and ARG_IDX.
5544 (fn_type_unification): Don't set an argument pack as incomplete if
5545 no argument pack was deduced.
5546 (type_unification_real): If a type parameter is a parameter pack
5547 and has not otherwise been deduced, it will be deduced to an empty
5549 (more_specialized_fn): Use the actual lengths of the argument
5550 lists when comparing against expansions.
5551 * semantics.c (finish_member_declaration): If a field's type has
5552 bare parameter packs, error and set its type to ERROR_MARK_NODE.
5554 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
5557 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
5559 2007-05-22 Ollie Wild <aaw@google.com>
5561 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
5562 (unqualified_namespace_lookup): Adds check for hidden types.
5564 2007-05-22 Ollie Wild <aaw@google.com>
5566 * decl.c (duplicate_decls): Verify namespace names are unique.
5568 2007-05-21 Mark Mitchell <mark@codesourcery.com>
5570 * decl.c (cxx_maybe_build_cleanup): Handle
5571 __attribute__((cleanup)).
5573 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5575 * cvt.c (cp_convert_and_check): Don't check warnings if the
5578 2007-05-18 Geoffrey Keating <geoffk@apple.com>
5580 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
5582 2007-05-14 Paolo Carlini <pcarlini@suse.de>
5585 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
5586 type only if is a class type (5.2.8/4).
5588 2007-05-14 Rafael Ávila de Espíndola <espindola@google.com>
5590 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
5591 * decl.c (grokdeclarator): Use unsigned_type_for instead of
5592 c_common_unsigned_type.
5594 2007-05-11 Silvius Rus <rus@google.com>
5596 * typeck.c (build_indirect_ref): Add call to
5597 strict_aliasing_warning.
5598 (build_reinterpret_cast_1): Condition call to
5599 strict_aliasing_warning.
5601 2007-05-11 Jan Hubicka <jh@suse.cz>
5603 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
5604 * decl2.c (start_objects): ctors and dtors are no longer public.
5605 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
5607 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
5609 * typeck.c (build_unary_op): Remove code that used to
5610 handle non lvalue increments/decrements.
5612 2007-05-07 Mike Stump <mrs@apple.com>
5614 * parser.c (check_empty_body): Add.
5615 (cp_parser_iteration_statement): Add call to check_empty_body.
5617 2007-05-05 Geoffrey Keating <geoffk@apple.com>
5620 * mangle.c (write_mangled_name): Mangle static variable names.
5621 (write_unqualified_name): Use local-source-name for
5622 namespace-scope static variables.
5624 2007-05-04 Dirk Mueller <dmueller@suse.de>
5626 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
5629 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
5632 * decl2.c (constrain_class_visibility):
5633 Use strip_pointer_or_array_types instead of strip_array_types.
5635 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
5638 * decl.c (reshape_init_r): Don't reshape the first element if it
5639 is a pointer to member function.
5641 2007-04-27 Simon Baldwin <simonb@google.com>
5643 * decl.c (grokparms): Changed message format from %qD to %qE.
5645 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
5647 * error.c (maybe_warn_variadic_templates): Variadic templates are
5648 now in C++0x, so only warn about them in C++98 mode.
5650 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
5653 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
5654 integeral types from vectors types.
5656 2007-04-26 Jakub Jelinek <jakub@redhat.com>
5659 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
5660 for type dependent OMP_CLAUSE_DECLs.
5662 2007-04-24 Mark Mitchell <mark@codesourcery.com>
5665 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
5666 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
5667 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
5668 * init.c (build_zero_init): Adjust, as
5669 COMPLEX_TYPE is now a SCALAR_TYPE.
5670 * typeck2.c (digest_init): Allow brace-enclosed initializers for
5671 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
5673 2007-04-25 Paolo Carlini <pcarlini@suse.de>
5675 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
5676 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
5677 (trait_expr_value): Adjust.
5679 2007-04-23 Simon Baldwin <simonb@google.com>
5681 * decl.c (grokparms): Added new error for duplicate function
5682 parameters names in function prototypes, to match gcc behavior.
5684 2007-04-23 Jan Hubicka <jh@suse.cz>
5686 * decl2.c (finish_objects): Do not call target constructor/destructor
5689 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
5691 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
5692 instead of checking GIMPLE_STMT_P in chain_next.
5694 2007-04-17 Mark Mitchell <mark@codesourcery.com>
5697 * call.c (convert_for_arg_passing): Convert bitfields to their
5700 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
5703 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
5705 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
5708 * decl2.c (constrain_class_visibility):
5709 Do not warn about the use of anonymous namespace in the main input file.
5711 2007-04-15 Mark Mitchell <mark@codesourcery.com>
5713 * cp-tree.h (current_template_parms): Fix typo in comment.
5715 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
5717 * cp-tree.h, error.c: Fix comment typos.
5719 2007-04-13 Jason Merrill <jason@redhat.com>
5722 * call.c (reference_binding): Add c_cast_p parm. If true,
5723 add quals to TO as needed to make it reference-compatible.
5725 2007-04-11 Jan Hubicka <jh@suse.cz>
5727 * class.c (convert_to_base_statically): Fold produced tree; verify
5728 that we are not processing template_decl.
5730 2007-04-09 Mark Mitchell <mark@codesourcery.com>
5733 * class.c (build_base_path): Ensure that the converted pointer has
5734 the same cv-qualification as the input.
5736 2007-04-09 Paolo Carlini <pcarlini@suse.de>
5738 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
5740 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
5742 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
5744 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
5745 * tree.c (cp_add_pending_fn_decls): Remove.
5746 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
5748 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
5750 Revert change removing staticp.
5752 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
5754 * cp-objcp-common.c (cxx_staticp): Remove.
5755 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
5756 * cp-tree.h (cxx_staticp):
5758 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
5760 * class.c (check_for_override): Don't remove dllmport attribute
5763 2007-04-03 Jakub Jelinek <jakub@redhat.com>
5766 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
5767 type issue error and return early.
5769 2007-03-30 Jason Merrill <jason@redhat.com>
5772 * typeck.c (cp_type_readonly): New fn.
5773 * cp-tree.h: Declare it.
5774 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
5775 (cp_finish_decl): Not here.
5777 2007-03-31 Richard Guenther <rguenther@suse.de>
5779 * optimize.c (maybe_clone_body): Replace splay-tree usage by
5782 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
5787 * parser.c (declarator_can_be_parameter_pack): New.
5788 (cp_parser_template_parameter): Only parse the `...' if the
5789 declarator can be a parameter pack.
5790 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
5792 * pt.c (find_parameter_packs_r): Look into the bounds on integer
5793 types (they could be used as array bounds).
5794 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
5795 (tsubst_pack_expansion): Handle failure to expand parameter
5798 2007-03-30 Paolo Carlini <pcarlini@suse.de>
5801 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
5802 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
5803 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
5804 (CLASS_TYPE_NON_UNION_P): Add.
5805 (struct lang_type_class): Add has_complex_dflt.
5806 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
5807 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
5808 * cp-tree.def: Add TRAIT_EXPR.
5809 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
5810 * lex.c (struct resword): Add __has_nothrow_assign,
5811 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
5812 __has_trivial_constructor, __has_trivial_copy,
5813 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
5814 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
5815 __is_pod, __is_polymorphic, __is_union.
5816 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
5817 (cp_parser_trait_expr): New.
5818 * semantics.c (finish_trait_expr, trait_expr_value
5819 classtype_has_nothrow_copy_or_assign_p): New.
5820 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
5822 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
5823 * class.c (check_bases, check_field_decl, check_bases_and_members):
5824 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
5825 * pt.c (uses_template_parms, tsubst_copy_and_build,
5826 value_dependent_expression_p, type_dependent_expression_p): Deal with
5828 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
5830 2007-03-29 Richard Guenther <rguenther@suse.de>
5832 * tree.c (cp_walk_subtrees): Do not set input_location.
5834 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
5837 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
5840 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5842 * parser.c (struct cp_parser): Update comment for
5843 greater_than_is_operator_p.
5844 (cp_parser_primary_expression): In C++0x mode, a cast operator can
5845 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
5846 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
5847 !GREATER_THAN_IS_OPERATOR_P.
5848 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
5849 `>>' operators that will become two `>' tokens in C++0x.
5850 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
5851 mode, allowing it to terminate default arguments.
5852 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
5853 `>>' like two consecutive `>' tokens.
5854 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
5855 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
5856 ends a template argument.
5858 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5860 * decl.c (redeclaration_error_message): Complain when redeclaring
5861 a friend function with default template arguments (C++0x mode only).
5862 * cp-tree.h (check_default_tmpl_args): Declare.
5863 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
5864 template arguments in function templates. Add support for checking
5865 the default template arguments of friend templates.
5866 (push_template_decl_real): Fix call to check_default_tmpl_args.
5867 (type_unification_real): If a template parameter has not been
5868 deduced but provides a default template argument, substitute into
5869 that default template argument.
5870 * parser.c (cp_parser_init_declarator): When declaring (but not
5871 defining!) a function template in C++0x mode, check for default
5874 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5877 * decl.c (grokdeclarator): Deal with cv-qualified function type
5878 typedefs in the same way for member and non-member functions.
5880 2007-03-26 Dirk Mueller <dmueller@suse.de>
5882 * parser.c (cp_parser_member_declaration): Pedwarn
5883 about stray semicolons after member declarations.
5885 2007-03-26 Paolo Carlini <pcarlini@suse.de>
5888 * pt.c (instantiate_decl): Set in_system_header.
5890 2007-03-22 Mark Mitchell <mark@codesourcery.com>
5892 * cp-tree.h (current_tempalte_parms): Improve documentation.
5893 * pt.c (current_template_args): Likewise.
5896 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
5897 not consume tokens when failing.
5899 2007-03-22 Jim Wilson <wilson@specifix.com>
5900 Mark Mitchell <mark@codesourcery.com>
5903 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
5904 consistent with FROM.
5906 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5908 * error.c (dump_expr): Handle dependent names that designate types.
5909 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
5911 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
5913 * cp-tree.def, parser.c, pt.c: Fix comment typos.
5915 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5917 * cvt.c (cp_convert_and_check) : Define.
5918 * cp-tree.h (cp_convert_and_check): Declare.
5919 * call.c (convert_conversion_warnings): Rename to
5920 conversion_null_warnings. The warning for floating-point to
5921 integer is handled by convert_and_check in convert_like_real.
5922 (convert_like_real): convert_conversion_warnings was renamed as
5923 conversion_null_warnings.
5924 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
5925 overflow and changes of value during conversion.
5927 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5930 * parser.c (cp_parser_statement): If 'namespace' is found, this
5931 only can be a namespace alias definition, so parse it now.
5932 (cp_parser_namespace_alias_definition): if we find an open brace
5933 instead of '=', then this is actually a misplaced namespace
5936 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5939 * decl.c (cxx_init_decl_processing): Move command-line options
5940 processing to c-opts.c.
5942 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
5944 * ptree.c (cxx_print_type): Use formatting markup for integers
5945 when printing template parameter index/level/orig level.
5946 (cxx_print_xnode): Ditto.
5947 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
5948 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
5949 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
5951 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
5952 rather than a HOST_WIDE_INT.
5953 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
5954 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
5956 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
5957 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
5958 IN_BASE_INITIALIZER bool bitfields.
5959 (struct cp_declarator): Make KIND a 4-bit field. Make
5960 PARAMETER_PACK_P a bool bitfield just after KIND.
5961 * pt.c (uses_parameter_packs): Destroy the pointer set.
5962 (make_pack_expansion): Ditto.
5963 (check_for_bare_parameter_packs): Ditto.
5964 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
5966 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
5969 * call.c (convert_default_arg): Instead of copying the node,
5972 2007-03-15 Dirk Mueller <dmueller@suse.de>
5975 * call.c (convert_conversion_warnings): New..
5976 (convert_like_real): .. factored out from here.
5977 (convert_conversion_warnings): Add warning about
5978 false being converted to NULL in argument passing.
5980 2007-03-14 Dirk Mueller <dmueller@suse.de>
5982 * semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
5983 (finish_do_body): Warn about empty body in do/while statement.
5985 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5987 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
5989 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5992 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
5995 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
5997 * repo.c (init_repo): Initialize random_seed saved options.
5998 (finish_repo): Adjust.
6000 2007-03-13 Mark Mitchell <mark@codesourcery.com>
6003 * Make-lang.in (doc/g++.1): Use $< to specify the location from
6006 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
6008 * decl.c (compute_array_index_type): New warning flag warn_vla.
6010 2007-03-12 Mark Mitchell <mark@codesourcery.com>
6013 * call.c (convert_default_arg): Copy non-constant arguments.
6015 2007-03-11 Mark Mitchell <mark@codesourcery.com>
6018 * parser.c (cp_parser_postfix_expression): Disallow compound
6019 literals in constant expressions.
6022 * semantics.c (finish_typeof): Use unlowered_expr_type.
6024 2007-03-10 Mark Mitchell <mark@codesourcery.com>
6027 * cp-tree.h (unlowered_expr_type): New function.
6028 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
6029 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
6030 (unlowered_expr_type): New function.
6031 (build_unary_op): Disallow predecrements of bool bitfields.
6032 * call.c (build_conditional_expr): Use unlowered_expr_type.
6033 * pt.c (type_unification_real): Likewise.
6035 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
6038 * typeck.c (check_return_expr): Check for bare parameter packs.
6039 (comptypes): Compare template parameter packs and
6040 type pack expansions.
6041 * decl.c (grokdeclarator): Deal with the declaration of function
6043 (grokparms): Verify that the (optional) function parameter pack is
6044 at the end of the parameter list.
6045 (xref_basetypes): Handle pack expansions in the base class.
6046 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
6047 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
6048 (NONTYPE_ARGUMENT_PACK): New.
6049 (TYPE_PACK_EXPANSION): New.
6050 (EXPR_PACK_EXPANSION): New.
6051 (ARGUMENT_PACK_SELECT): New.
6052 * cp-objcp-common.c (cp_tree_size): Compute size of
6053 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
6054 ARGUMENT_PACK_SELECT.
6055 * error.c (dump_template_argument): Print template argument packs.
6056 (dump_template_argument_list): Ditto.
6057 (dump_template_parameter): Dump `...' for template type parameter
6059 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
6060 (dump_parameters): Print function parameter packs.
6061 (dump_template_parms): Print template argument packs.
6062 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
6063 (maybe_warn_variadic_templates): New.
6064 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
6065 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
6066 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
6068 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
6069 (write_template_arg): Write argument packs as separate arguments.
6070 * cp-tree.h (struct template_parm_index_s): Add flag that
6071 indicates that the template parameter is actually a parameter
6073 (struct tree_argument_pack_select): New.
6074 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
6075 (union lang_tree_node): Add argument_pack_select.
6076 (FUNCTION_PARAMETER_PACK_P): New.
6077 (PACK_EXPANSION_P): New.
6078 (PACK_EXPANSION_PATTERN): New.
6079 (SET_PACK_EXPANSION_PATTERN): New.
6080 (PACK_EXPANSION_PARAMETER_PACKS): New.
6081 (ARGUMENT_PACK_P): New.
6082 (ARGUMENT_PACK_ARGS): New.
6083 (SET_ARGUMENT_PACK_ARGS): New.
6084 (ARGUMENT_PACK_INCOMPLETE_P): New.
6085 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
6086 (TEMPLATE_PARM_PARAMETER_PACK): New.
6087 (TEMPLATE_TYPE_PARAMETER_PACK): New.
6088 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
6089 (ARGUMENT_PACK_SELECT_INDEX): New.
6090 (ARGUMENT_PACK_SELECT_ARG): New.
6091 (struct cp_declarator): Add parameter_pack_p flag.
6092 (maybe_warn_variadic_templates): Declare.
6093 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
6094 indicate a template parameter pack.
6095 (uses_parameter_packs): Declare.
6096 (template_parameter_pack_p): Declare.
6097 (template_parms_variadic_p): Declare.
6098 (make_pack_expansion): Declare.
6099 (check_for_bare_parameter_packs): Declare.
6100 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
6101 sizeof... expressions.
6102 (pp_cxx_expression): Print pack expansions and non-type argument
6104 (pp_cxx_exception_specification): Print pack expansions.
6105 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
6106 (pp_cxx_ctor_initializer): Print pack expansions.
6107 (pp_cxx_type_id): Print pack expansions.
6108 (pp_cxx_template_argument_list): Print argument packs.
6109 (pp_cxx_template_parameter): Print ellipsis for template parameter
6111 * pt.c (comp_template_parms): Compare template parameter packs.
6112 (template_parameter_pack_p): New.
6113 (template_parms_variadic_p): New.
6114 (template_args_variadic_p): New.
6115 (make_ith_pack_parameter_name): New.
6116 (struct find_parameter_pack_data): New.
6117 (find_parameter_packs_r): New.
6118 (uses_parameter_packs): New.
6119 (make_pack_expansion): New.
6120 (check_for_bare_parameter_packs): New.
6121 (expand_template_argument_pack): New.
6122 (reduce_template_parm_level): Propagate parameter pack flag.
6123 (process_template_parm): Add is_parameter_pack parameter to state
6124 when the parameter is actually a parameter pack. Create template
6125 parameter packs when is_parameter_pack is true.
6126 (current_template_args): The argument for a template parameter
6127 pack is an argument pack containing a single pack expansion.
6128 (process_partial_specialization): When checking that non-type
6129 argument expressions do not involve template parameters, loop over
6130 the arguments in argument packs separately.
6131 (push_template_decl_real): Check that the type of the declaration
6132 does not have any bare parameter packs. Check that primary
6133 templates have no more than one parameter pack, and that it comes
6134 at the end of the template parameter list.
6135 (convert_template_argument): Handle coercions for pack expansion
6136 expressions by coercing the pattern then rebuilding the expansion.
6137 (coerce_template_parms): When coercing the arguments for a
6138 variadic template, pack "extra" arguments into an argument pack.
6139 (coerce_template_template_parms): Cannot coerce between parameter
6140 packs and non-pack parameters.
6141 (template_args_equal): Compare PACK_EXPANSION_P expressions.
6142 (comp_template_args): Expand all template arguments packs before
6143 comparing template argument lists.
6144 (mangle_class_name_for_template): Make argument packs as separate
6146 (for_each_template_parm_r): No need to handle BASELINK.
6147 (instantiate_class_template): Handle pack expansions in the base
6149 (tsubst_pack_expansion): New.
6150 (tsubst_template_args): Handle substitutions of argument packs and
6151 pack expansion into template argument lists.
6152 (tsubst_decl): Expand function parameter packs into separate
6153 function parameters.
6154 (tsubst_arg_types): Expand a type pack expansion into separate
6156 (tsubst_exception_specification): Handle pack expansions in
6157 exception specifiers.
6158 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
6159 replacing a template parameter with its argument. If we encounter
6160 a substitution for an argument pack, just return the parameter
6162 (tsubst_copy): sizeof(X...) returns the number of elements in
6163 parameter pack X. See through ARGUMENT_PACK_SELECT when the
6164 PARM_DECL is a parameter pack.
6165 (tsubst_expr): Expression pack expansions and argument packs
6166 cannot show up here; they will all be handled through function
6167 calls, sizeof, and template argument lists.
6168 (tsubst_copy_and_build): sizeof(X...) returns the number of
6169 elements in parameter pack X. Handle pack expansions in TREE_LIST
6170 and CONSTRUCTOR nodes.
6171 (fn_type_unification): Handle "incomplete" explicit template
6172 argument lists that specify some of the arguments for a template
6174 (type_unification_real): Unify arguments against pack expansions.
6175 (template_parm_level_and_index): New, helper function.
6176 (unify_pack_expansion): New.
6177 (unify): Unify argument packs on an argument-by-argument basis,
6178 handling variadic argument packs as well.
6179 (more_specialized_fn): Handle unification of function parameter
6180 packs. All things being equal, prefer non-variadic function
6181 templates to variadic function templates.
6182 (more_specialized_class): Prefer the variadic class template
6183 partial specialization that binds fewer arguments to a parameter
6185 (regenerate_decl_from_template): Expand function parameter packs
6186 into separate parameters.
6187 (instantiate_decl): Ditto.
6188 (tsubst_initializer_list): Handle pack expansions for base-class
6190 (dependent_type_p_r): Determine dependent types in argument packs
6191 and pack expansions.
6192 (value_dependent_expression_p): Determine value-dependence of
6193 non-type argument packs.
6194 (dependent_template_arg_p): Handle argument packs.
6195 * semantics.c (finish_cond): Check for bare parameter packs.
6196 (finish_expr_stmt): Ditto.
6197 (finish_for_expr): Ditto.
6198 (finish_switch_cond): Ditto.
6199 (finish_mem_initializers): Ditto.
6200 * name-lookup.c (arg_assoc_type): Handle pack expansions and
6202 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
6203 * parser.c (make_declarator): Declarator is not an expansion.
6204 (make_pointer_declarator): Transfer parameter pack flag to outer
6206 (make_reference_declarator): Ditto.
6207 (make_ptrmem_declarator): Ditto.
6208 (make_call_declarator): Ditto.
6209 (make_array_declarator): Ditto.
6210 (cp_parser_postfix_expression): Allow pack expansion expressions
6211 in the argument list for a call expression.
6212 (cp_parser_parenthesized_expression_list): Add new parameter
6213 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
6214 into separate arguments."
6215 (cp_parser_new_placement): Allow pack expansion expressions.
6216 (cp_parser_new_initializer): Ditto.
6217 (cp_parser_mem_initializer_list): Allow ellipsis to create a
6218 base-class initializer expansion.
6219 (cp_parser_mem_initializer): Ditto.
6220 (cp_parser_template_parameter_list): Keep track of whether the
6221 template parameter is a template parameter pack.
6222 (cp_parser_template_parameter): Parse the ellipsis to indicate a
6223 template parameter pack.
6224 (cp_parser_type_parameter): Ditto.
6225 (cp_parser_template_argument_list): Parse the ellipsis to indicate
6227 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
6228 this declarator is a parameter pack.
6229 (cp_parser_parameter_declaration): The ellipsis does not end the
6230 parameter declaration, because it might be a parameter pack. Parse
6231 the ellipsis to indicate a parameter pack.
6232 (cp_parser_initializer): Allow pack expansions.
6233 (cp_parser_initializer_list): Allow ellipsis to create an
6234 initializer expansion.
6235 (cp_parser_base_clause): Allow ellipsis to create a base specifier
6237 (cp_parser_type_id_list): Allow ellipsis to create an exception
6238 specifier expansion.
6239 (cp_parser_attribute_list): Don't allow pack expansions.
6240 (cp_parser_functional_cast): Allow pack expansions.
6241 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
6242 compute the length of a parameter pack.
6243 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
6244 end a template argument.
6245 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
6246 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
6249 2007-03-09 Dirk Mueller <dmueller@suse.de>
6251 * call.c (build_new_op): Call warn_logical_operator.
6253 2007-03-08 Volker Reichelt <v.reichelt@netcologne.de>
6256 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
6259 * pt.c (any_template_arguments_need_structural_equality_p):
6262 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
6264 * decl.c (grokdeclarator): Disable warnings for anonymous
6267 2007-03-05 Volker Reichelt <v.reichelt@netcologne.de>
6269 * typeck2.c (readonly_error): Always emit a hard error.
6270 Remove last argument.
6271 * cp-tree.h (readonly_error): Adjust prototype.
6272 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
6273 * typeck.c (build_unary_op): Likewise.
6274 (build_modify_expr): Likewise.
6276 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
6279 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
6281 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6284 * parser.c (struct cp_parser): New IN_IF_STMT.
6285 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
6286 returning if parsing the body of an 'if' statement or issuing an
6287 error and continuing.
6288 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
6290 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
6292 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
6295 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
6298 2007-03-02 Geoffrey Keating <geoffk@apple.com>
6300 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
6301 Objective-C++. Don't exit early if -shared-libgcc needs to be
6304 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6306 * typeck.c (common_base_type): Delete unused function.
6308 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
6310 * Make-lang.in: Add dummy lang.install-pdf target.
6312 2007-03-01 Simon Baldwin <simonb@google.com>
6315 * decl.c (check_tag_decl): Added new warning for typedef ignored
6316 when it precedes an otherwise valid non-typedef declaration.
6318 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
6320 * typeck.c (build_function_call): Store converted arguments
6321 in a stack-allocated array instead of building a list.
6322 (convert_arguments): Store arguments in the array passed in as an
6323 argument, and return the actual number of arguments.
6324 * call.c (build_call): Delete, and replace with...
6325 (build_call_n, build_call_a): New.
6326 (build_op_delete_call): Rewrite to avoid constructing argument lists.
6327 (build_over_call): Store converted arguments in a stack-allocated
6328 array instead of building a list.
6329 (build_cxx_call): Pass arguments in an array instead of as a list.
6330 (build_java_interface_fn_ref): Rewrite to avoid constructing
6332 * tree.h: Update declarations to reflect above changes.
6333 * method.c (use_thunk): Use a stack-allocated array to hold
6334 the arguments instead of a list.
6335 * rtti.c (throw_bad_cast): Update call to cxx_call.
6336 (throw_bad_typeid): Likewise.
6337 (build_dynamic_cast_1): Likewise.
6338 * init.c (build_builtin_delete_call): Use build_call_n.
6339 * decl.c (expand_static_init): Likewise.
6340 * except.c (cp_protect_cleanup_actions): Likewise.
6341 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
6342 (gimplify_must_not_throw_expr): Likewise.
6343 (cxx_omp_apply_fn): Use build_call_a.
6345 2007-02-26 Mark Mitchell <mark@codesourcery.com>
6347 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
6348 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
6350 2007-02-25 Mark Mitchell <mark@codesourcery.com>
6352 * cp-tree.h (static_ctors): Remove.
6353 * cp-tree.h (static_dtors): Likewise.
6354 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
6355 refactoring of tree_map hierarchy.
6356 (decl_shadowed_for_var_insert): Likewise.
6357 * semantics.c (expand_body): Use c_expand_body.
6358 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
6359 * decl2.c (static_ctors): Remove.
6360 (static_dtors): Likewise.
6361 (generate_ctor_or_dtor_function): Pass NULL_TREE to
6362 objc_generate_static_init_call. Do not call static_[cd]tors.
6363 (generate_ctor_and_dtor_functions_for_priority): Do not check for
6365 (cp_write_global_declarations): Likewise.
6367 2007-02-23 Richard Guenther <rguenther@suse.de>
6369 * class.c (note_name_declared_in_class): Make declaration
6370 changes meaning a pedwarn.
6372 2007-02-22 Michael Matz <matz@suse.de>
6375 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
6376 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
6377 dump_function_decl): Guard emitting outer scopes by new flag.
6378 * cp-lang.c (cxx_dwarf_name): New function.
6379 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
6380 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
6382 (push_template_decl_real, lookup_template_class): Remove calls
6385 2007-02-19 Mark Mitchell <mark@codesourcery.com>
6387 * call.c (build_new_method_call): Ensure that explicit calls of
6388 destructors have type "void".
6390 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6392 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
6393 and -Walways-true with -Waddress.
6394 * cvt.c (convert_to_void): Replace unconditional warning with
6397 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
6399 * decl.c, tree.c: Fix comment typos.
6401 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
6404 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
6405 statement expression if we had an error mark node.
6407 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
6408 Brooks Moses <brooks.moses@codesourcery.com>
6409 Lee Millward <lee.millward@codesourcery.com>
6411 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
6412 Change class to tcc_vl_exp.
6414 * call.c (build_call): Use build_call_list instead
6416 (build_over_call): Likewise.
6417 (build_new_method_call): Use build_min_non_dep_call_list
6418 instead of build_min_non_dep.
6420 * error.c (dump_call_expr_args): New function.
6421 (dump_aggr_init_expr_args): New function.
6422 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
6423 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
6425 * cvt.c (convert_to_void): Use build_call_array instead
6426 of build3; use new AGGR_INIT_EXPR accessor macros.
6428 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
6429 instead of TREE_CODE_LENGTH.
6431 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
6432 AGGR_INIT_EXPR accessor macros.
6434 * cp-gimplify.c (cp_gimplify_init_expr): Use
6435 AGGR_INIT_EXPR_SLOT to set the slot operand.
6437 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
6438 (AGGR_INIT_EXPR_SLOT): New macro.
6439 (AGGR_INIT_EXPR_ARG): New macro.
6440 (aggr_init_expr_nargs): New macro.
6441 (AGGR_INIT_EXPR_ARGP): New macro.
6442 (aggr_init_expr_arg_iterator): New.
6443 (init_aggr_init_expr_arg_iterator): New.
6444 (next_aggr_init_expr_arg): New.
6445 (first_aggr_init_expr_arg): New.
6446 (more_aggr_init_expr_args_p): New.
6447 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
6448 (stabilize_aggr_init): New declaration.
6449 (build_min_non_dep_call_list): Likewise.
6451 * tree.c (process_aggr_init_operands): New function.
6452 (build_aggr_init_array) New function.
6453 (build_cplus_new): Update to use new CALL_EXPR and
6454 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
6455 build_aggr_init_array.
6456 (build_min_non_dep_call_list) New function.
6457 (build_min_nt): Assert input code parameter is not a variable
6458 length expression class.
6459 (build_min, build_min_non_dep): Likewise.
6460 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
6461 to check for equality instead of recursing. Handle tcc_vl_exp
6463 (stabilize_call): Update to only handle CALL_EXPRs, not
6464 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
6465 (stabilize_aggr_init): New function.
6466 (stabilize_init): Use it.
6468 * cxx-pretty-print.c (pp_cxx_postfix_expression)
6469 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
6470 AGGR_INIT_EXPR accessor macros and argument iterators.
6472 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
6473 build_vl_exp. Iterate through the operands, recursively
6474 processing each one.
6475 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
6476 CALL_EXPR accessor macros.
6477 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
6478 tree code classes. Use TREE_OPERAND_LENGTH instead of
6481 * semantics.c (finish_call_expr): Use build_nt_call_list
6482 instead of build_nt.
6483 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
6484 accessor macros. Use build_call_array to construct the
6485 CALL_EXPR node instead of build3
6487 * decl2.c (build_offset_ref_call_from_tree): Use
6488 build_nt_call_list and build_min_non_dep_call_list instead
6489 of build_min_nt and build_min_non_dep.
6491 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
6492 Use build_nt_call_list instead of build_min_nt.
6494 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6497 * call.c (build_conditional_expr): Improve error message.
6499 2007-02-13 Dirk Mueller <dmueller@suse.de>
6501 * friend.c (do_friend): Annotate warning about friend
6502 declarations in templates with OPT_Wnon_template_friend.
6503 Convert informal message from warning() to inform().
6505 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
6506 Mark Mitchell <mark@codesourcery.com>
6509 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
6510 instantiations for variables.
6512 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6515 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
6516 Check warn_unused_value just once.
6518 2007-02-11 Mark Mitchell <mark@codesourcery.com>
6521 * pt.c (determine_specialization): Use skip_artificial_parms_for.
6522 (fn_type_unificiation): Likewise.
6523 (get_bindings): Likewise.
6525 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
6528 * decl.c (finish_function): Use DECL_REPLACEABLE.
6529 * tree.c (cp_cannot_inline_tree_fn): Likewise.
6531 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
6533 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
6535 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
6537 * decl.c (grokvardecl): Don't error if !have_tls.
6538 (grokdeclarator): Likewise.
6539 * parser.c (cp_parser_omp_threadprivate): Likewise.
6541 2007-02-07 Jakub Jelinek <jakub@redhat.com>
6544 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
6545 parameters and result decls in omp clauses.
6546 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
6549 2007-02-05 Dirk Mueller <dmueller@suse.de>
6552 * parser.c (cp_parser_class_specifier): Always initialize bases.
6554 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
6556 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
6557 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
6558 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
6560 * semantics.c (finish_omp_atomic): Store a whole expression node
6561 in operand 1, and integer_zero_node in operand 0, for dependent
6562 OMP_ATOMIC. Rewrite to make flow easier to understand.
6564 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6566 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
6568 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
6570 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
6571 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
6573 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
6575 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
6576 keyword warning to -Wc++0x-compat.
6578 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6580 * decl.c (grokdeclarator): Update documentation.
6582 2007-02-02 Jakub Jelinek <jakub@redhat.com>
6585 * decl.c (grokdeclarator): If __thread is used together with
6586 a storage class other than extern and static, clear thread_p
6587 after issuing diagnostics and fall through to checking the
6590 2007-01-30 Roger Sayle <roger@eyesopen.com>
6592 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
6593 calculating the size of an array (to avoid recursive errors).
6595 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6598 * typeck.c (build_binary_op): Fix logic for warning. Move warning
6600 * call.c (convert_like_real): Don't warn when converting to
6603 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6605 * decl.c (pop_label): Replace warning with call to
6606 warn_for_unused_label.
6608 2007-01-28 Andrew Pinski <pinskia@gmail.com>
6611 * semantics.c (finish_pseudo_destructor_expr): Check the
6612 destrutor name by calling check_dtor_name.
6614 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
6616 * lex.c (D_CPP0X): Rename.
6618 (reswords): D_CPP0X -> D_CXX0X.
6619 (init_reswords): Ditto.
6620 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
6621 of C++0x keywords as identifiers.
6623 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
6626 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
6629 2007-01-23 Ian Lance Taylor <iant@google.com>
6631 * typeck.c (convert_for_assignment): Only warn about a = b = c
6632 when converting to bool.
6634 2007-01-23 Roger Sayle <roger@eyesopen.com>
6636 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
6638 * typeck.c (ignore_overflows): Remove the remaining uses of
6639 TREE_CONSTANT_OVERFLOW.
6641 2007-01-20 Jan Hubicka <jh@suse.cz>
6643 * decl2.c (start_objects, start_static_storage_duration_function):
6644 Do not make the functions uninlinable.
6646 2007-01-17 Ian Lance Taylor <iant@google.com>
6648 * class.c (add_method): Call VEC_reserve_exact rather than passing
6649 a negative size to VEC_reserve.
6651 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
6654 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
6656 2007-01-10 Mark Mitchell <mark@codesourcery.com>
6659 * decl.c (make_typename_type): If the qualified name is not a
6660 type, issue an error.
6661 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
6664 2007-01-08 Geoffrey Keating <geoffk@apple.com>
6666 * rtti.c: Include target.h.
6667 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
6668 don't emit typeinfo for fundamental types as weak.
6669 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
6671 2007-01-08 Richard Guenther <rguenther@suse.de>
6673 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
6675 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
6677 * call.c (standard_conversion): Pass flag to
6678 vector_types_convertible_p to disallow emission of note.
6679 * typeck.c (convert_for_assignment): Pass flag to
6680 vector_types_convertible_p to allow emission of note.
6681 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
6682 to disallow emission of note.
6684 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6687 * typeck.c (build_binary_op): Call overflow_warning if
6688 TREE_OVERFLOW_P is true for the result and not for any of the
6691 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
6694 * class.c (add_method): Don't wait until template
6695 instantiation time to complain about duplicate methods.
6697 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6700 * semantics.c (finish_unary_op_expr): Warn only if result
6701 overflowed and operands did not.
6703 2007-01-05 Ian Lance Taylor <iant@google.com>
6705 * typeck.c (build_binary_op): Warn about comparing a non-weak
6708 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
6710 * pt.c (tsubst): Propagate the need for structural equality checks
6711 when reducing the level of template parameters.
6713 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
6715 * pt.c: Fix a comment typo.
6717 2007-01-02 Ian Lance Taylor <iant@google.com>
6719 * semantics.c (maybe_convert_cond): Optionally warn when using an
6720 assignment as a condition.
6721 * typeck.c (convert_for_assignment): Optionally warn about
6722 assigning the result of an assignment to a bool.
6724 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
6726 * pt.c (canonical_template_parms): Correct typo in comment.
6728 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
6730 * typeck.c (structural_comptypes): Renamed from "comptypes".
6731 (comptypes): Use canonical type information to perform fast type
6732 comparison. When VERIFY_CANONICAL_TYPES, verify that the
6733 canonical type comparison returns the same results as we would see
6734 from the current, structural check. Support COMPARE_STRUCTURAL
6735 when we need structural checks.
6736 * decl.c (typename_compare): Fix comment.
6737 (build_typename_type): TYPENAME_TYPE nodes require structural
6738 equality checks, because they resolve different based on the
6740 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
6741 require structural equality checks (for now).
6742 (build_ptrmemfunc_type): Build the canonical pointer to member
6744 (compute_array_index_type): Whenever we build a new index type
6745 to represent the size of an array in a template, we need to mark
6746 this index type as requiring structural equality. This goes for
6747 arrays with value-dependent sizes with the current ABI, or all
6749 * tree.c (cplus_array_hash): New.
6750 (struct cplus_array_info): New.
6751 (cplus_array_compare): New.
6752 (cplus_array_htab): New.
6753 (build_cplus_array_type_1): Use a hash table to cache the array
6754 types we build. Build the canonical array type for each array
6756 (cp_build_qualified_type_real): When building a cv-qualified array
6757 type, use the hash table of array types and build canonical array
6759 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
6760 use structural equality (for now).
6761 * cp-tree.h (COMPARE_STRUCTURAL): New.
6762 * pt.c (canonical_template_parms): New.
6763 (canonical_type_parameter): New.
6764 (process_template_parm): Find the canonical type parameter.
6765 (lookup_template_class): When we have named the primary template
6766 type, set the canonical type for our template class to the primary
6767 template type. If any of the template arguments need structural
6768 equality checks, the template class needs structural equality
6770 (tsubst): When reducing the level of a template template
6771 parameter, we require structural equality tests for the resulting
6772 parameter because its template parameters have not had their types
6773 canonicalized. When reducing a template type parameter, find the
6774 canonical reduced type parameter.
6775 (any_template_arguments_need_structural_equality_p): New.