1 2009-01-05 Jason Merrill <jason@redhat.com>
4 * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
8 * class.c (defaultable_fn_p): Only operator== can be a copy
11 2009-01-02 Jason Merrill <jason@redhat.com>
14 * typeck2.c (process_init_constructor_union): Handle excess
16 (process_init_constructor_record): Likewise.
19 * typeck2.c (digest_init_r): Don't use process_init_constructor
20 for non-aggregate classes.
22 2008-12-31 Jakub Jelinek <jakub@redhat.com>
25 * parser.c (cp_parser_primary_expression) <case RID_FUNCTION_NAME>:
26 Return error_mark_node if cp_parser_non_integral_constant_expression
30 * semantics.c (finish_decltype_type): Handle TEMPLATE_PARM_INDEX.
32 2008-12-29 Jakub Jelinek <jakub@redhat.com>
35 * parser.c (cp_parser_condition): Use cp_parser_require
36 instead of cp_lexer_consume_token to consume =.
39 * decl.c (start_enum): If enumtype is error_mark_node, exit early.
41 2008-12-28 Jakub Jelinek <jakub@redhat.com>
44 * semantics.c (finish_omp_for): Don't add CLEANUP_POINT_EXPR
45 around volatile iteration var in condition and/or increment
48 2008-12-27 Jakub Jelinek <jakub@redhat.com>
51 * pt.c (tsubst_omp_for_iterator): RECUR on whole init_expr instead of
54 2008-12-21 Jason Merrill <jason@redhat.com>
57 * name-lookup.c (arg_assoc_type): Handle DECLTYPE_TYPE.
59 2008-12-20 Jakub Jelinek <jakub@redhat.com>
60 Manuel López-Ibáñez <manu@gcc.gnu.org>
63 * c-common.c (warn_about_parentheses): Remove ARG_UNUSED from
64 arg_left. Don't warn about X<=Y<=Z if comparison's type isn't
67 2008-12-19 Jakub Jelinek <jakub@redhat.com>
70 * call.c (build_new_method_call): Handle call being COMPOUND_EXPR
73 2008-12-18 Jakub Jelinek <jakub@redhat.com>
76 * init.c (perform_member_init): For value-initialized
77 references call permerror instead of warning and don't emit any
80 2008-12-18 Jason Merrill <jason@redhat.com>
83 * parser.c (cp_parser_token_starts_cast_expression): An EOF
84 can't start a cast-expression.
86 2008-12-17 Jason Merrill <jason@redhat.com>
88 * semantics.c (describable_type): New function.
89 (finish_decltype_type): Use it for dependent exprs.
90 * cp-tree.h: Declare it.
91 * mangle.c (write_type) [DECLTYPE_TYPE]: Set skip_evaluation.
92 (write_expression): If skip_evaluation, use type stubs.
93 * tree.c (cp_tree_equal): Handle PARM_DECLs from different
94 declarations of a function.
95 * init.c (build_new): Do auto deduction if type is describable.
96 * decl.c (cp_finish_decl): Likewise.
97 * parser.c (cp_parser_omp_for_loop): Likewise.
99 2008-12-10 Jason Merrill <jason@redhat.com>
102 * mangle.c (write_builtin_type): Add mangling for decimal floating
103 point and fixed point types.
104 (write_type): Pass FIXED_POINT_TYPE along.
106 2008-12-09 Mark Mitchell <mark@codesourcery.com>
109 * class.c (resolve_address_of_overloaded_function): Check
110 accessibility of member functions unless FLAGS indicates
112 * call.c (standard_conversion): Adjust flags passed to
114 (convert_default_arg): Do not perform access checks.
115 * cp-tree.h (tsubst_flags_t): Add tf_no_access_control.
117 2008-12-08 Steve Ellcey <sje@cup.hp.com>
119 * decl2.c (mark_used): Remove assemble_external call.
121 2008-12-08 Dodji Seketeli <dodji@redhat.com>
124 * name-lookup.c (kept_level_p): Don't forget the case of levels
125 having using directives.
127 2008-12-08 Richard Henderson <rth@redhat.com>
130 * class.c (finish_struct_bits): Use SET_TYPE_MODE.
131 * decl.c (record_unknown_type): Likewise.
132 (start_enum, finish_enum): Likewise.
134 2008-12-05 Jakub Jelinek <jakub@redhat.com>
137 * error.c (dump_expr): Handle BIT_FIELD_REF.
139 2008-12-05 Sebastian Pop <sebastian.pop@amd.com>
142 * Make-lang.in (cc1plus-dummy, cc1plus): Add BACKENDLIBS,
145 2008-12-04 Jason Merrill <jason@redhat.com>
148 * decl.c (grok_special_member_properties): Set TYPE_HAS_COMPLEX_DFLT
150 * class.c (check_bases_and_members): Rather than assuming any
151 user-declared default constructor is complex here.
153 2008-12-04 Richard Guenther <rguenther@suse.de>
156 * typeck.c (get_member_function_from_ptrfunc): Mark the vtbl
157 pointer access with TREE_NO_WARNING.
159 2008-12-03 Jason Merrill <jason@redhat.com>
162 * init.c (build_value_init): Do initial zero-initialization
163 of a class with an implicitly-defined constructor using
164 build_zero_init rather than in build_value_init.
165 (build_value_init_1): Fold into build_value_init.
168 * parser.c (cp_parser_conversion_type_id): Diagnose
169 'operator auto' here.
170 * decl.c (grokdeclarator): Not here.
173 * decl.c (grokdeclarator): Only set DECL_NONCONVERTING_P
174 on explicit constructors.
175 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Propagate
176 CONSTRUCTOR_IS_DIRECT_INIT.
178 2008-12-02 Jason Merrill <jason@redhat.com>
180 PR c++/35782, c++/37860
181 * call.c (build_user_type_conversion_1): Remember
183 (convert_like_real): Likewise.
184 (build_over_call): Don't require the copy constructor
185 for copy-list-initialization.
186 * cp-tree.h (TARGET_EXPR_LIST_INIT_P): New macro.
189 * decl.c (cp_finish_decl): Handle =default and =delete for
192 2008-12-01 Jakub Jelinek <jakub@redhat.com>
195 * parser.c (cp_parser_omp_for_loop): Handle auto.
196 * pt.c (tsubst_omp_for_iterator): Likewise.
198 2008-11-28 Jason Merrill <jason@redhat.com>
201 * init.c (perform_member_init): Fix value-initialization.
202 (build_value_init_1): Add assert to catch cases that will break
204 (build_default_init): Remove.
205 * cp-tree.h: Remove its prototype.
206 * pt.c (tsubst_expr) [DECL_EXPR]: Use build_value_init for
207 value-initialization.
210 * parser.c (cp_parser_class_name): Only call
211 maybe_note_name_used_in_class if we actually found a class name.
213 2008-11-25 Jason Merrill <jason@redhat.com>
216 * decl2.c (check_classfn): Error rather than abort on parameter
219 2008-11-20 Jason Merrill <jason@redhat.com>
222 * parser.c (cp_parser_class_name): Call maybe_note_name_used_in_class.
225 * call.c (build_over_call): Take the address of the function even
227 (build_new_method_call): Remember the type of the called function
230 2008-11-19 Dodji Seketeli <dodji@redhat.com>
233 * pt.c (coerce_template_template_parm): Use the more robust
234 uses_template_parms instead of dependent_type_p.
236 2008-11-19 Dodji Seketeli <dodji@redhat.com>
239 * pt.c (lookup_template_class): Check pointers before dereferencing
241 * error.c (dump_template_decl): Likewise.
243 2008-11-19 Jason Merrill <jason@redhat.com>
246 * decl2.c (grokfield): Pass ATTR_FLAG_TYPE_IN_PLACE for a typedef
247 that names a class for linkage purposes.
250 * parser.c (cp_parser_pseudo_destructor_name): A pseudo-destructor
251 name is not a declaration.
254 * pt.c (instantiate_decl): Don't require a definition of
255 a template that is explicitly instantiated 'extern'.
257 2008-11-18 Jason Merrill <jason@redhat.com>
258 Jakub Jelinek <jakub@redhat.com>
261 * parser.c (cp_parser_type_id): Complain about auto.
262 * decl.c (grokdeclarator): Complain about parameters and
263 conversion functions declared with auto.
265 * call.c (standard_conversion): Use CLASS_TYPE_P instead of
267 * cp-tree.h (TYPE_NON_AGGREGATE_CLASS): Likewise.
269 2008-11-17 Jakub Jelinek <jakub@redhat.com>
272 * init.c (constant_value_1): Handle TREE_LIST init.
274 2008-11-15 Jakub Jelinek <jakub@redhat.com>
277 * typeck.c (cp_build_unary_op): Don't call get_unwidened. Use
278 argtype instead of result_type.
280 2008-11-14 Jason Merrill <jason@redhat.com>
283 * semantics.c (finish_call_expr): Don't repeat arg-dep lookup
284 for a non-dependent call.
287 * call.c (build_aggr_conv): Increment i.
289 2008-11-13 Jason Merrill <jason@redhat.com>
292 * typeck2.c (process_init_constructor_record): Update bitfield
294 (check_narrowing): Update bitfield handling, print source type.
296 2008-11-12 Jakub Jelinek <jakub@redhat.com>
300 2007-05-07 Mike Stump <mrs@apple.com>
301 * parser.c (check_empty_body): Add.
302 (cp_parser_iteration_statement): Add call to check_empty_body.
304 2008-11-12 Jason Merrill <jason@redhat.com>
307 * typeck.c (cp_build_modify_expr): Update bitfield handling.
309 2008-11-12 Jakub Jelinek <jakub@redhat.com>
312 * parser.c (cp_parser_simple_declaration): Don't commit
313 to tentative parse if parse errors were seen.
316 * error.c (dump_expr): Handle COMPLEX_EXPR.
318 2008-11-10 Jakub Jelinek <jakub@redhat.com>
321 * parser.c (cp_parser_enum_specifier): After parsing :,
322 parse definitely. Don't return early if type specifier
325 2008-11-06 David Edelsohn <edelsohn@gnu.org>
328 * g++spec.c (LIBSTDCXX_STATIC): New.
329 (lang_spec_driver): Use LIBSTDCXX_STATIC when not
332 2008-11-05 Fabien Chene <fabien.chene@gmail.com>
335 * cp-tree.h: Fix DECL_NONSTATIC_MEMBER_P to handle member template
338 2008-11-05 Richard Guenther <rguenther@suse.de>
341 * decl.c (start_preparsed_function): Use the correct type for
342 building the RESULT_DECL.
344 2008-10-31 Jakub Jelinek <jakub@redhat.com>
347 * decl.c (grokdeclarator): Diagnose auto function decl without
348 late return type and late return type function decl where type
352 * decl.c (cp_finish_decl): Diagnose type_uses_auto type with
355 2008-10-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
358 * class.c (check_bitfield_decl): Rename min_precision to
359 tree_int_cst_min_precision.
360 * decl.c (finish_enum): Likewise.
362 2008-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
365 * parser.c (cp_parser_token_starts_cast_expression): New.
366 (cp_parser_cast_expression): Peek the next token to decide whether
367 this could be a parenthesized constructor or is definitely an
370 2008-10-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
373 * typeck.c (build_x_binary_op): Update call to
374 warn_about_parentheses.
375 * parser.c (cp_parser_binary_expression): Add note about passing
376 the correct code for unary expressions.
378 2008-10-24 Jakub Jelinek <jakub@redhat.com>
380 * Make-lang.in (check-c++-subtargets): New alias for
381 check-g++-subtargets.
382 (lang_checks_parallelized): Add check-g++.
383 (check_g++_parallelize): New variable.
385 2008-10-21 Richard Guenther <rguenther@suse.de>
387 * semantics.c (simplify_aggr_init_exprs_r): Remove.
388 (expand_or_defer_fn): Do not walk the function body to
389 simplify aggr_init_exprs.
391 2008-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
394 * typeck.c (cp_common_type): New. The same as
395 type_after_usual_arithmetic_conversions but without promotions.
396 (type_after_usual_arithmetic_conversions): Do the promotions and
398 (common_type): Make it behave like the C version of this
399 function. Do not handle pointer types.
400 (common_pointer_type): Move handling of pointer types from
402 (cp_build_binary_op): Use common_pointer_type instead of
403 common_type in call to pointer_diff.
404 Use cp_common_type instead of common_type.
405 * cp-tree.h (common_pointer_type): Declare.
407 2008-10-14 Jakub Jelinek <jakub@redhat.com>
410 * cp-gimplify.c (cp_genericize_r): Only fold_convert COND_EXPR
411 arguments if they don't already have COND_EXPR's type.
413 2008-10-14 Paolo Carlini <paolo.carlini@oracle.com>
416 * pt.c (push_template_decl_real): Check that current_template_parms
418 (process_partial_specialization): Assert current_template_parms not
421 2008-10-13 Doug Evans <dje@google.com>
423 * cp-tree.h (DECL_MAIN_P): Fix parentheses around expression.
425 2008-10-10 Jakub Jelinek <jakub@redhat.com>
428 * cp-gimplify.c (cp_genericize_r): Fix up bitfield operands of
431 2008-10-09 Jakub Jelinek <jakub@redhat.com>
434 * semantics.c (finalize_nrv_r): Clear DECL_INITIAL instead of
435 setting it to error_mark_node.
437 2008-10-07 Steve Ellcey <sje@cup.hp.com>
439 * decl.c (start_cleanup_fn): Declare as inline.
441 2008-10-06 Jason Merrill <jason@redhat.com>
443 PR c++/37376, other mangling issues
444 * mangle.c (write_type): Update TYPE_PACK_EXPANSION mangling.
445 (write_member_name): Break out from...
446 (write_expression): ...here. Handle dependent COMPONENT_REF.
447 (write_template_arg): Wrap an argument pack in 'I'/'E'.
448 (write_builtin_type): Update char16/32_t mangling.
449 (write_nested_name, write_prefix): Don't forget template args
451 * operators.def: Add ARROW_EXPR, update COMPONENT_REF and
454 2008-10-06 Aldy Hernandez <aldyh@redhat.com>
456 * typeck.c (build_x_indirect_ref): Add location argument.
457 (cp_build_binary_op): Pass location to warn_for_div_by_zero.
458 (cp_build_unary_op): Add location argument.
459 (cp_build_modify_expr): Same.
460 * class.c (build_base_path): Pass location to build_indirect_ref.
461 * semantics.c (handle_omp_for_class_iterator): Pass elocus to
464 2008-10-05 Dodji Seketeli <dodji@redhat.com>
467 * cp-gimplify.c (cp_gimplify_expr): For each USING_STMT
468 make sure an IMPORTED_DECL node is added to the BLOCK_VARS list
469 of the innermost containing BLOCK.
471 2008-10-03 Paolo Carlini <paolo.carlini@oracle.com>
474 * error.c (dump_function_decl): Save the exceptions in case of
475 error about incompatible specifications in a specialization.
477 2008-10-01 Andrew Pinski <andrew_pinski@playstation.sony.com>
479 * tree.c (lvalue_p_1): COMPOUND_LITERAL_EXPR is also an lvalue.
481 2008-09-30 H.J. Lu <hongjiu.lu@intel.com>
484 * parser.c (cp_parser_selection_statement): Fix uninitialized
487 2008-09-30 Simon Martin <simartin@users.sourceforge.net>
491 * decl.c (grokdeclarator): Set the type for typedefs to a
492 nested-name-specifier to error_mark_node.
494 2008-09-30 Paolo Bonzini <bonzini@gnu.org>
496 * parser.c (cp_parser_selection_statement): Implement here the
497 -Wempty-body warning for `if' and `else' statements.
498 * semantics.c (finish_if_stmt): Do not call empty_body_warning.
500 2008-09-25 Paolo Carlini <paolo.carlini@oracle.com>
503 * name-lookup.c (maybe_process_template_type_declaration): Check
504 return value of push_template_decl_real for error_mark_node.
506 2008-09-24 Aldy Hernandez <aldyh@redhat.com>
508 * semantics.c (finish_fname): Pass location to fname_decl.
510 2008-09-23 Jakub Jelinek <jakub@redhat.com>
513 * semantics.c (finish_omp_for): If processing_template_decl, just build
514 MODIFY_EXPR for init instead of calling cp_build_modify_expr.
516 2008-09-23 Aldy Hernandez <aldyh@redhat.com>
518 * typeck.c (build_array_ref): Pass location to cp_build_binary_op.
519 (get_member_function_from_ptrfunc): Same.
520 (build_x_binary_op): Same.
521 (build_binary_op): Same.
522 (cp_build_binary_op): New location argument.
523 (pointer_diff): Pass location to cp_build_binary_op.
524 (cp_truthvalue_conversion): Pass location to build_binary_op.
525 (convert_ptrmem): Pass location to cp_build_binary_op.
526 (cp_build_modify_expr): Same.
527 (build_ptrmemfunc): Same.
528 * init.c (expand_cleanup_for_base): Pass location to
529 c_common_truthvalue_conversion.
530 (build_new_1): Pass location to cp_build_binary_op.
531 (build_vec_delete_1): Pass location to *build_binary_op,
532 c_common_truthvalue_conversion.
533 (build_vec_init): Same.
534 (build_delete): Same.
535 * decl.c (compute_array_index_type): Same.
536 * call.c (build_new_op): Same.
537 * rtti.c (build_dynamic_cast_1): Same.
538 * cp-tree.h: Add argument to cp_build_binary_op.
539 * semantics.c (handle_omp_for_class_iterator): Pass location to
540 *build_binary_op, c_common_truthvalue_conversion.
541 * decl2.c (get_guard_cond): Same.
543 2008-09-17 Richard Guenther <rguenther@suse.de>
546 * rtti.c (build_dynamic_cast_1): Convert the COND_EXPR
547 result to the correct type.
549 2008-09-17 H.J. Lu <hongjiu.lu@intel.com>
552 * name-lookup.c (pushdecl_maybe_friend): Don't return the old
553 parameter for duplicate.
555 2008-09-17 Jason Merrill <jason@redhat.com>
558 * name-lookup.c (lookup_type_scope): Look through sk_function_parms.
560 2008-09-17 Jakub Jelinek <jakub@redhat.com>
563 * typeck.c (build_array_ref): Use protected_set_expr_location instead
564 of SET_EXPR_LOCATION when ret might not be an expression.
566 2008-09-17 Jan Hubicka <jh@suse.cz>
569 * cp/decl.c (start_method): Set DECL_NO_INLINE_WARNING_P.
571 2008-09-16 Jakub Jelinek <jakub@redhat.com>
574 * semantics.c (finish_compound_literal): Return error_mark_node if
578 * lex.c (init_reswords): Don't populate ridpointers for D_CONLY
581 2008-09-15 Aldy Hernandez <aldyh@redhat.com>
583 * decl.c (duplicate_decls): Call error_at.
584 (grokfndecl): New location argument. Use location if available.
585 (grokdeclarator): Pass declarator location to grokfndecl.
586 * cp-tree.h (struct cp_declarator): Update comment for id_loc.
587 * decl2.c (check_classfn): Use error_at.
588 * parser.c (cp_parser_init_declarator): Set function_start_locus
590 (cp_parser_member_declaration): Set id_loc for function declarators.
592 2008-09-09 Jan Hubicka <jh@suse.cz>
595 * pt.c (tsubst_decl): Do not copy DECL_STRUCT_FUNCTION pointer.
597 2008-09-09 Jakub Jelinek <jakub@redhat.com>
600 * tree.c (array_type_nelts_top): Add size_one_node instead of
603 2008-09-09 Jason Merrill <jason@redhat.com>
606 * pt.c (tsubst_copy) [PARM_DECL]: Don't abort if the parm has
609 2008-09-09 Jakub Jelinek <jakub@redhat.com>
612 * decl.c (build_enumerator): Handle previous value's DECL_INITIAL
613 being error_operand_p. Don't clear value if it was error_mark_node.
615 2008-09-09 Paolo Bonzini <bonzini@gnu.org>
617 * cp-objcp-common.h (LANG_HOOKS_EXPAND_DECL): Remove.
618 * cp-tree.h: Don't mention DECL_ANON_UNION_ELEMS.
619 * semantics.c (anon_aggr_type_p): Remove.
621 2008-09-06 Jason Merrill <jason@redhat.com>
624 * parser.c (cp_parser_parameter_declaration_list): Process the
625 PARM_DECLs as we go and push them. Return a TREE_LIST.
626 (cp_parser_parameter_declaration_clause): Return a TREE_LIST.
627 (cp_parser_direct_declarator): Create a binding level and
628 suppress deprecated warnings in the parameter list.
629 (make_call_declarator): PARMS is now a tree.
630 * cp-tree.h (struct cp_declarator): Function parms are now a tree.
631 * decl.h (enum deprecated_states, deprecated_state): Move here.
633 (type_is_deprecated): New fn.
634 (grokparms): PARMLIST is a tree now. Warn about parms that
635 use deprecated types.
636 * mangle.c (write_expression): Handle PARM_DECL, CALL_EXPR and
638 * pt.c (tsubst) [DECLTYPE_TYPE]: Set skip_evaluation.
639 (tsubst_copy) [PARM_DECL]: Handle a PARM_DECL used outside of a
641 * name-lookup.c (pushtag): Look through function parameter scopes.
642 (pushdecl_maybe_friend): Don't set DECL_CONTEXT on a PARM_DECL
643 when we're parsing a function declarator.
645 2008-09-05 Douglas Gregor <doug.gregor@gmail.com>
648 * tree.c (cp_build_qualified_type_real): Deal with sharing of
649 TYPE_LANG_SPECIFIC in the canonical types of pointer-to-method
652 2008-09-04 Ian Lance Taylor <iant@google.com>
654 * parser.c (check_no_duplicate_clause): Change code parameter to
655 enum omp_clause_code.
657 2008-09-03 Jakub Jelinek <jakub@redhat.com>
660 * decl.c (cp_finish_decl): Only set
661 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P if decl is VAR_DECL.
664 * cp-tree.h (defer_mark_used_calls, deferred_mark_used_calls): New
666 * decl2.c (mark_used): If defer_mark_used_calls, push decl into
667 deferred_mark_used_calls vector and exit early.
668 * decl.c (defer_mark_used_calls, deferred_mark_used_calls): New
670 (finish_function): Set defer_mark_used_calls for the duration of the
671 function. Call mark_used on any queued decls.
673 2008-09-02 Jason Merrill <jason@redhat.com>
676 * call.c (build_over_call): Make =delete work with SFINAE.
677 * class.c (resolve_address_of_overloaded_function): Likewise.
679 * cp-tree.h (struct lang_decl_flags): Rename threadprivate_p to
680 threadprivate_or_deleted_p.
681 (CP_DECL_THREADPRIVATE_P): Adjust.
682 (DECL_DELETED_FN): Likewise.
683 (SD_UNINITIALIZED, SD_INITIALIZED, SD_DEFAULTED): New macros.
684 (SD_DELETED): New macro.
685 * parser.c (cp_parser_init_declarator): Use them.
686 * decl.c (start_decl): Use them.
688 * decl2.c (mark_used): Give =deleted error even in sizeof.
690 * typeck2.c (check_narrowing): Downgrade narrowing error to
693 2008-09-02 Aldy Hernandez <aldyh@redhat.com>
695 * typeck.c (build_array_ref): Use new location argument.
696 * class.c (build_vtbl_ref_1): Pass location to build_array_ref.
697 * call.c (build_new_op): Same.
698 * decl2.c (grok_array_decl): Same.
699 * cp-tree.h (build_array_ref): Add location argument to prototype.
701 2008-09-01 Aldy Hernandez <aldyh@redhat.com>
703 * typeck.c (build_x_indirect_ref): Add location argument.
704 * class.c (build_base_path): Pass location to build_indirect_ref.
705 * pt.c (tsubst_copy_and_build): Pass location to
706 finish_label_address_expr.
707 * parser.c (cp_parser_unary_expression): Same.
709 2008-08-31 Jason Merrill <jason@redhat.com>
711 Implement late-specified return type using 'auto'.
712 * cp-tree.h (struct cp_declarator): Add late_return_type field to
714 * parser.c (cp_parser_late_return_type_opt): New fn.
715 (cp_parser_direct_declarator): Use it.
716 (make_call_declarator): Put it in the declarator.
717 * decl.c (grokdeclarator): Splice in late-specified return type.
718 * pt.c (splice_late_return_type): New fn.
720 2008-08-29 Michael Meissner <gnu@the-meissners.org>
722 * decl.c (builtin_function_1): Take a bool argument to decide
723 whether to use pushdecl or pushdecl_top_level.
724 (duplicate_decls): Copy function specific target and optimization
725 options on duplicate declarations.
726 (cxx_builtin_function): Update builtin_function_1 call.
727 (cxx_builtin_function_ext_scope): New function, guarantee that the
728 declaration is done at global scope.
730 * cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE): New
731 macro, define builtin function hook for delayed machine specific
734 * cp-tree.h (cxx_builtin_function_ext_scope): Add declaration.
736 2008-08-30 Jason Merrill <jason@redhat.com>
739 * pt.c (dependent_type_p): Don't abort on auto outside of a template.
741 2008-08-29 Jason Merrill <jason@redhat.com>
743 Implement C++0x 'auto' semantics.
744 * decl.c (start_decl_1): Don't complain about auto being incomplete.
745 (cp_finish_decl): Deduce auto.
746 * init.c (build_new): Handle 'new auto'.
747 * typeck2.c (cxx_incomplete_type_diagnostic): Give a different
748 message for auto than for normal template type parms.
749 * pt.c (type_dependent_expression_p): Handle { }.
750 (make_auto): New function.
751 (listify_autos): New function.
752 (do_auto_deduction): New function.
753 (is_auto): New function.
754 (type_uses_auto): New function.
755 * cp-tree.h: Declare them.
756 * parser.c (cp_parser_decl_specifier_seq): In C++0x mode, don't
757 treat auto as a declspec.
758 (cp_parser_simple_type_specifier): It's a type-specifier.
760 2008-08-29 Mark Mitchell <mark@codesourcery.com>
762 * mangle.c (write_type): Add target-specific manglings for
763 non-fundamental types to the substitution table.
766 2008-08-29 Jakub Jelinek <jakub@redhat.com>
770 * name-lookup.c (do_using_directive, cp_emit_debug_info_for_using):
771 Adjust debug_hooks->imported_module_or_decl callers.
773 2008-08-29 Jan Hubicka <jh@suse.cz>
775 * cp-gimplify.c (cp_gimplify_expr): Add PRED_CONTINUE heuristic.
777 2008-08-28 Paolo Carlini <paolo.carlini@oracle.com>
780 * decl.c (reshape_init_r): Check init for error_mark_node.
782 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
785 * semantics.c (maybe_convert_cond): Call verify_sequence_points.
786 (finish_return_stmt): Likewise.
787 (finish_switch_condition): Likewise.
789 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
791 * cp-tree.h: Fix #error directive.
793 2008-08-26 Douglas Gregor <doug.gregor@gmail.com>
795 * typeck.c (type_after_usual_arithmetic_conversions): Don't do the
796 usual arithmetic conversions on scoped enumeration types.
797 (common_type): Ditto.
798 (default_conversion): Don't perform integral promotions on scoped
800 (build_array_ref): Scoped enumeration types can't be used as
802 * decl.c (start_enum): If building a C++0x scoped enumeration,
803 enter its scope. If provided with an underlying type, check that
804 underlying type and set up the enumeration type accordingly.
805 (finish_enum): Only compute an underlying type if the underlying
806 type isn't already fixed, and only convert the enumerator values
807 now if we've just computed the underlying type. Finish the scope
808 of C++0x scoped enumerations.
809 (build_enumerator): For enumerations with a fixed underlying type,
810 check the enumerator values when the enumerator is defined.
811 (lookup_enumerator): New.
812 * call.c (standard_conversion): Don't allow assignment from
813 integers to scoped enumeration types, even with -fpermissive.
814 Don't convert from scoped enumerations to bool or any arithmetic
816 (build_conditional_expr): Don't per the usual arithmetic
817 conversions for scoped enumeration types.
818 (convert_like_real): Check complain to see if we should
820 * error.c (class_key_or_enum_as_string): Print scoped enums.
821 * cp-tree.h (MAYBE_CLASS_TYPE_P): Check CLASS_TYPE_P, not
823 (INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P): New.
824 (SCOPED_ENUM_P): New.
825 (UNSCOPED_ENUM_P): New.
826 (SET_SCOPED_ENUM_P): New.
827 (ENUM_UNDERLYING_TYPE): New.
828 * pt.c (lookup_template_class): Update the instantiation of enum
829 types to deal with C++0x scoped enumerations and underlying
831 * name-lookup.c (begin_scope): Deal with scoped enumeration
833 (lookup_qualified_name): Deal with lookup into enumeration types.
834 * name-lookup.h (enum scope_kind): Add sk_scoped_enum.
835 * parser.c (cp_parser_class_or_namespace_name): Rename to...
836 (cp_parser_qualifying_entity): ... this. Also, in C++0x mode,
837 parse a type-name that can be an enumeration type.
838 (cp_parser_nested_name_specifier_opt): Update with C++0x grammar.
839 (cp_parser_elaborated_type_specifier): Parse the
840 optional `struct' or `class' following enum (in C++0x).
841 (cp_parser_enum_specifier): Parse C++0x scoped enumerations and
844 2008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
846 * typeck.c: Update all calls to pedwarn.
851 * name-lookup.c: Likewise.
852 * parser.c: Likewise.
854 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
857 * parser.c (cp_parser_omp_for_loop): Handle parenthesized
860 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
862 * parser.c: Update all calls to inform.
863 * typeck.c: Likewise.
867 * method.c: Likewise.
868 * friend.c: Likewise.
869 * typeck2.c: Likewise.
871 * name-lookup.c: Likewise.
874 2008-08-19 Jakub Jelinek <jakub@redhat.com>
877 * error.c (cp_print_error_function): Deal with recursive BLOCK trees.
879 2008-08-18 Tomas Bily <tbily@suse.cz>
881 * tree.c (cp_tree_equal): Use CONVERT_EXPR_CODE_P.
883 2008-08-18 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
885 * typeck.c: Update all callers of permerror.
890 * except.c: Likewise.
892 * typeck2.c: Likewise.
894 * semantics.c: Likewise.
895 * name-lookup.c: Likewise.
898 * parser.c: Likewise.
900 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
903 * pt.c (check_template_shadow): Change to return a bool.
904 * name-lookup.c (push_class_level_binding): Early return if
905 check_template_shadow returns false.
906 * cp-tree.h (check_template_shadow): Adjust declaration.
908 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
911 * decl.c (grokdeclarator): In case of extern and initializer, return
912 error_mark_node after the error.
914 2008-08-13 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
917 * decl.c (grokfndecl): Call check_main_parameters_type only if
920 2008-08-12 Paolo Carlini <paolo.carlini@oracle.com>
923 * parser.c (cp_parser_class_head): Early return error_mark_node in
924 case of global qualification of class name or qualified name that
925 does not name a class.
927 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
930 * cvt.c (ocp_convert): Warn for out-of-range conversions to enum.
932 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
935 * cp-tree.h (struct diagnostic_context, struct diagnostic_info):
936 Delete forward declarations. Check that toplev.h has not been
937 included before this file. Include toplev.h and diagnostic.h.
938 * error.c (cp_cpp_error): Use DK_PEDWARN.
939 (cxx_incomplete_type_diagnostic): Update declaration.
940 (cxx_incomplete_type_error): Use DK_ERROR.
941 * typeck2.c (cxx_incomplete_type_diagnostic): Take a diagnostic_t
942 as argument. Use emit_diagnostic.
943 (cxx_incomplete_type_error): Use DK_ERROR.
944 (add_exception_specifier): Use diagnostic_t instead of custom
946 * typeck.c (complete_type_or_else): Update call to
947 cxx_incomplete_type_diagnostic.
948 * init.c (build_delete): Likewise.
949 * call.c (diagnostic_fn_t): Remove unused typedef.
950 (build_temp): Pass a pointer to diagnostic_t.
951 (convert_like_real): Use emit_diagnostic.
952 (joust): Check return value of warning before giving informative
954 * friend.c (do_friend): Check return value of warning
955 before giving informative note.
956 * parser.c (cp_parser_template_id): Likewise.
958 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
961 * class.c (check_bases_and_members): Warn with -Wuninitialized
964 2008-08-08 Volker Reichelt <v.reichelt@netcologne.de>
967 * decl.c (xref_basetypes): Check base for MAYBE_CLASS_TYPE_P,
968 and make sure it is not a union.
970 2008-08-07 H.J. Lu <hongjiu.lu@intel.com>
972 * semantics.c (finish_decltype_type): Initialize type.
974 2008-08-07 Douglas Gregor <doug.gregor@gmail.com>
976 * semantics.c (finish_decltype_type): Handle calls to function
977 pointers and references to functions properly.
979 2008-08-06 Douglas Gregor <doug.gregor@gmail.com>
982 * parser.c (cp_parser_template_argument): Don't assume that '>>'
983 following a type-id is an error when in C++0x mode.
985 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
988 * decl.c (grokdeclarator): Use explicit location with permerror_at.
990 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
993 * typeck.c (cp_build_binary_op): Move code to c-common.c.
995 2008-08-05 Jason Merrill <jason@redhat.com>
998 * decl.c (build_ptrmemfunc_type): Don't require structural
999 comparison of PMF types.
1000 * tree.c (cp_build_qualified_type_real): Don't clear
1001 a valid TYPE_PTRMEMFUNC_TYPE.
1002 * typeck.c (cp_build_unary_op): Still do build_ptrmemfunc in
1005 2008-08-04 Jason Merrill <jason@redhat.com>
1008 * typeck2.c (check_narrowing): Allow narrowing conversion
1009 from an explicit floating-point constant.
1012 * pt.c (tsubst_decl): Leave DECL_INITIAL set on deleted
1015 2008-08-04 Simon Baldwin <simonb@google.com>
1018 * parser.c (cp_parser_elaborated_type_specifier): Warn only when
1019 the declaration's id is followed by a semicolon.
1021 2008-07-31 Jakub Jelinek <jakub@redhat.com>
1024 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Call
1025 complete_type_or_else even for UNKNOWN_TYPE to get diagnostics.
1027 2008-07-31 Jason Merrill <jason@redhat.com>
1030 * init.c (build_new_1): Don't convert pointer to the data type
1031 until we're actually going to treat it as that type.
1034 * tree.c (build_aggr_init_expr): Split out...
1035 (build_cplus_new): ...from here.
1036 (stabilize_init): Don't mess with AGGR_INIT_EXPR either.
1037 * init.c (build_new_1): new T() means value-initialization,
1038 not default-initialization.
1039 (build_vec_init): Likewise.
1040 (build_value_init_1): Use build_aggr_init_expr.
1042 2008-07-30 Dodji Seketeli <dseketel@redhat.com>
1045 * decl2.c (fix_temporary_vars_context_r): New function.
1046 (one_static_initialization_or_destruction): Make sure temporary
1047 variables part of the initialiser have their DECL_CONTEXT()
1050 2008-07-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1053 * typeck.c (build_binary_op): Encapsulate code into
1056 2008-07-29 Jakub Jelinek <jakub@redhat.com>
1059 * tree.c (cplus_array_hash, build_cplus_array_type_1): Hash on
1060 TYPE_UID instead of pointers.
1062 2008-07-29 Jan Hubicka <jh@suse.cz>
1064 * optimize.c (maybe_clone_body): Remove DECL_INLINE.
1065 * decl.c (duplicate_decls): Likewise.
1066 (grokfndecl): Likewise.
1067 (start_method): Likewise.
1068 * method.c (make_thunk, make_alias_for, implicitly_declare_fn):
1070 * pt.c (register_specialization, regenerate_decl_from_template):
1072 * decl2.c (grokfield): Likewise.
1074 2008-07-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1077 * decl.c (duplicate_decls): Merge USED flags.
1079 2008-07-27 Jason Merrill <jason@redhat.com>
1082 * decl.c (reshape_init_r): Allow C++0x initializer lists.
1084 2008-07-28 Richard Guenther <rguenther@suse.de>
1086 Merge from gimple-tuples-branch.
1088 2008-07-22 Aldy Hernandez <aldyh@redhat.com>
1090 * cp-gimplify.c (gimplify_if_stmt): Set location on newly created
1093 2008-07-18 Jakub Jelinek <jakub@redhat.com>
1095 * decl.c (finish_function): Call gimple_body after cp_genericize.
1097 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
1099 * optimize.c: Include gimple.h instead of tree-gimple.h.
1100 * Make-lang.in (cp-gimplify.o): Depend on tree-iterator.h.
1101 * cp-gimplify.c: Rename tree-gimple.h to gimple.h. Include
1104 2008-07-16 Jakub Jelinek <jakub@redhat.com>
1106 * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE for the clone.
1108 2008-07-14 Jakub Jelinek <jakub@redhat.com>
1110 * cp-gimplify.c (cp_gimplify_expr): Update comment.
1112 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
1114 * cp-tree.h (union lang_tree_node): Rename GENERIC_NEXT to
1116 * cp-gimplify.c (cxx_omp_clause_apply_fn): Rename
1117 GIMPLE_MODIFY_STMT to MODIFY_EXPR.
1118 (cxx_omp_clause_copy_ctor): Same.
1119 (cxx_omp_clause_assign_op): Same.
1121 2008-05-28 Jakub Jelinek <jakub@redhat.com>
1123 * cp-gimplify.c (cp_gimplify_omp_for): Add pre_p argument. Tuplify.
1124 (cp_gimplify_expr): Adjust caller.
1126 2008-05-11 Doug Kwan <dougkwan@google.com>
1128 * init.c (build_vec_delete): Add type conversion for argument
1129 0 of POINTER_PLUS_EXPR.
1131 2008-04-29 Doug Kwan <dougkwan@google.com>
1133 * decl2 (File): Include "gimple.h"
1134 (cp_write_global_declarations): Use gimple_body instead of
1136 * Make-lang.in (cp/decl2.o): Add $(GIMPLE_H)
1138 2008-04-10 Diego Novillo <dnovillo@google.com>
1140 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00913.html
1142 * optimize.c (maybe_clone_body): Re-enable call to
1144 * cp-gimplify.c (cp_gimplify_omp_for): Mark disabled
1145 code with call to gimple_unreachable.
1146 (cp_genericize): Fix handling of clone bodies.
1148 2008-04-04 Diego Novillo <dnovillo@google.com>
1150 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00413.html
1152 * optimize.c (maybe_clone_body): Re-enable.
1154 2008-02-19 Diego Novillo <dnovillo@google.com>
1155 Oleg Ryjkov <olegr@google.com>
1157 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
1159 * cp-gimplify.c (gimplify_for_stmt): Change gimple_seq
1160 argument to gimple_seq *. Update all users.
1161 (gimplify_must_not_throw_expr): Likewise.
1163 2008-02-04 Oleg Ryjkov <olegr@google.com>
1165 * except.c: Include gimple.h
1166 (cp_protect_cleanup_actions): Convert to tuples.
1167 * Make-lang.in (cp/except.o): Add dependency on gimple.h
1169 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
1171 * cp-gimplify.c (gimplify_cp_loop): Call tree_annotate_all_with_locus
1172 instead of annotating each block manually.
1174 2007-10-30 Aldy Hernandez <aldyh@redhat.com>
1176 * cp-gimplify.c (gimplify_cp_loop): Tuplify.
1177 (gimplify_for_stmt): Same.
1178 (gimplify_switch_stmt): Same.
1179 (cp_gimplify_expr): [FOR_STMT]: Do not call gimplify_for_stmt. Return
1181 [WHILE_STMT]: Return GS_OK.
1182 [SWITCH_STMT]: Same.
1183 [CONTINUE_STMT]: Same.
1185 (cp_genericize): Set gimple_body() of cloned functions when needed.
1187 2007-10-29 Aldy Hernandez <aldy@quesejoda.com>
1189 * cp-gimplify.c: Move build_gimple_eh_filter_tree here.
1190 (cp_gimplify_init_expr): Convert to tuples.
1191 (gimplify_must_not_throw_expr): Make function return a
1192 gimplify_status and convert to tuples.
1194 2007-10-18 Aldy Hernandez <aldy@quesejoda.com>
1196 * cp-gimplify.c (genericize_try_block): Enable and do not call
1198 (genericize_catch_block): Same.
1199 (genericize_eh_spec_block): Same.
1200 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
1201 (cp_gimplify_expr): Enable TRY_BLOCK, HANDLER, and EH_SPEC_BLOCK.
1203 2007-10-16 Aldy Hernandez <aldy@quesejoda.com>
1205 * optimize.c (maybe_clone_body): Comment out call to clone_body.
1206 * decl.c (finish_function): Use gimple_body instead of
1208 * cp-tree.h (cp_gimplify_expr): Last 2 arguments are sequences.
1209 * cp-gimplify.c (genericize_try_block): Comment out.
1210 (genericize_catch_block): Same.
1211 (genericize_eh_spec_block): Same.
1212 (gimplify_cp_loop): Comment out calls to gimplify_stmt.
1213 (gimplify_for_stmt): Comment out.
1214 (gimplify_switch_stmt): Comment out call to gimplify_stmt.
1215 (cp_gimplify_omp_for): Same.
1216 (gimplify_must_not_throw_expr): Argument pre_p is a sequence.
1217 Comment out call to gimplify_stmt and append_to_statement_list.
1218 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
1219 (cp_gimplify_init_expr): Arguments pre_p and post_p are sequences.
1220 (cp_gimplify_expr): Same.
1221 Comment out calls to genericize_*_block. Comment out call to
1224 2008-07-27 H.J. Lu <hongjiu.lu@intel.com>
1227 * class.c (type_has_user_provided_default_constructor): Handle
1230 2008-07-27 Paolo Carlini <paolo.carlini@oracle.com>
1232 * decl.c (push_library_fn): Add a parameter for the exceptions that
1233 the function may throw.
1234 (push_void_library_fn, push_throw_library_fn, expand_static_init):
1236 (build_library_fn): Change to static.
1237 * cp-tree.h: Adjust declarations.
1238 * except.c (declare_nothrow_library_fn): New.
1239 (do_get_exception_ptr, do_begin_catch, do_free_exception,
1240 do_allocate_exception): Use the latter, adjust the declarations
1241 (ie, add empty exception-specification), consistently with the
1242 actual implementation in libsupc++.
1244 2008-07-25 Jan Hubicka <jh@suse.cz>
1246 * typeck.c (inline_conversion): Remove.
1247 (cp_build_function_call): Do not use inline_conversion.
1248 * decl.c (duplicate_decls): Do not insist on inline being declared
1250 (start_cleanup_fn): Do not assume that INLINE flags prevent function
1251 from being output. We now remove static functions always.
1252 (finish_function): Do return warning on all static functions.
1253 * call.c (build_over_call): Do not use inline_conversion.
1254 * cp-tree.h (possibly_inlined_p): Declare.
1255 (inline_conversion): Remove.
1256 * pt.c (instantiate_decl): Use possibly_inlined_p predicate.
1257 * decl2.c (cp_write_global_declarations): Likewise.
1258 (mark_used): Likewise.
1259 (possibly_inlined_p): New functions.
1261 2008-07-25 Jason Merrill <jason@redhat.com>
1263 * class.c (type_has_user_provided_default_constructor): Handle
1266 2008-07-23 Jan Hubicka <jh@suse.cz>
1268 * decl.c (duplicate_decls): Update comment and unit-at-a-time.
1269 (grogfndecl): Drop flag_inline_trees code.
1270 * pt.c (instantiate_decl): Drop flag_iline_trees code.
1271 * lex.c (cxx_init): Do not set unit-at-a-time.
1273 2008-07-23 Jason Merrill <jason@redhat.com>
1275 * mangle.c (write_unqualified_name): Avoid infinite recursion when
1276 trying to mangle a decl with no name.
1278 Implement defaulted/deleted functions as per N2346
1279 * cp-tree.h (struct lang_decl_flags): Add defaulted_p bitfield.
1280 (DECL_DELETED_FN): New macro.
1281 (DECL_DEFAULTED_FN): New macro.
1282 * class.c (user_provided_p): New fn.
1283 (defaultable_fn_p): New fn.
1284 (type_has_user_provided_constructor): New fn.
1285 (type_has_user_provided_default_constructor): New fn.
1286 (check_methods): A defaulted fn is still trivial.
1287 (check_bases_and_members): Likewise.
1288 * decl.c (grok_special_member_properties): Likewise.
1289 (duplicate_decls): Complain about redeclaring a function as deleted.
1290 (start_decl): initialized==2 means deleted.
1291 (cp_finish_decl): Handle deleted/defaulted semantics.
1292 * decl2.c (grokfield): Likewise.
1293 (mark_used): Check DECL_DEFAULTED_FN instead of DECL_ARTIFICIAL.
1294 Complain about using a deleted fn.
1295 * init.c (build_value_init_1): Use type_has_user_provided_constructor.
1296 (perform_member_init): Check for a user-provided default constructor
1297 even if TYPE_NEEDS_CONSTRUCTING.
1298 (build_new_1): Likewise.
1299 * call.c (build_over_call): Don't call mark_used twice.
1300 * method.c (implicitly_declare_fn): Set DECL_DEFAULTED_FN.
1301 * search.c (check_final_overrider): Check for deleted mismatch.
1302 * parser.c (cp_parser_init_declarator): Tell start_decl about =delete.
1303 (cp_parser_pure_specifier): Handle =default and =delete.
1305 * error.c (maybe_warn_cpp0x): Suggest -std=gnu++0x as well.
1307 2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1310 * typeck.c: All calls to pedwarn changed.
1311 * decl.c: All calls to pedwarn changed.
1312 * call.c: All calls to pedwarn changed.
1313 * error.c: All calls to pedwarn changed.
1314 * typeck2.c: All calls to pedwarn changed.
1315 * pt.c: All calls to pedwarn changed.
1316 * name-lookup.c: All calls to pedwarn changed.
1317 * parser.c: All calls to pedwarn changed.
1319 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1321 * call.c: Fix comment typos.
1322 * class.c: Likewise.
1323 * cp-tree.h: Likewise.
1324 * cxx-pretty-print.c: Likewise.
1327 * name-lookup.c: Likewise.
1328 * operators.def: Likewise.
1329 * parser.c: Likewise.
1332 * typeck.c: Likewise.
1334 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
1338 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Only check
1339 copy constructors and copy assignment operators proper.
1341 2008-07-21 Rafael Ávila de Espíndola <espindola@google.com>
1343 * parser.c (cp_token): Remove in_system_header.
1344 (eof_token): Remove in_system_header.
1345 (cp_lexer_get_preprocessor_token): Don't set in_system_header.
1346 (cp_lexer_set_source_position_from_token): Don't set in_system_header.
1347 (cp_parser_member_declaration): Use in_system_header_at.
1348 * pt.c (lookup_template_class): Don't set DECL_IN_SYSTEM_HEADER.
1349 (pop_tinst_level): Don't set in_system_header.
1350 (instantiate_class_template): Don't set in_system_header.
1351 (instantiate_decl): Don't set in_system_header.
1352 (instantiate_pending_templates): Don't set in_system_header.
1354 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
1357 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Use
1358 TYPE_NOTHROW_P, not TREE_NOTHROW.
1359 (trait_expr_value): Likewise.
1361 2008-07-18 Dodji Seketeli <dseketel@redhat.com>
1364 * call.c (convert_like_real): Don't take the error code path
1365 when a rvalue or base conversion has the bad_p field set.
1367 2008-07-18 Kris Van Hees <kris.van.hees@oracle.com>
1369 * rtti.c (emit_support_tinfos): Add char16_type_node and
1371 * typeck2.c (digest_init): Support char16_t and char32_t.
1373 2008-07-18 Kavih R. Ghazi <ghazi@caip.rutgers.edu>
1375 * cvt.c (convert_to_void): Avoid C++ keywords.
1376 * decl.c (walk_namespaces_r, wrapup_globals_for_namespace):
1378 * friend.c (is_friend): Likewise.
1379 * init.c (perform_member_init): Likewise.
1380 * mangle.c (write_template_prefix, write_template_template_param):
1382 * name-lookup.c (do_namespace_alias, do_using_directive,
1383 parse_using_directive, ambiguous_decl, arg_assoc): Likewise.
1384 * parser.c (cp_parser_template_id, cp_parser_namespace_definition,
1385 cp_parser_objc_typename, cp_parser_objc_method_keyword_params):
1387 * pt.c (is_specialization_of_friend, lookup_template_class,
1388 push_tinst_level, instantiate_class_template,
1389 tsubst_copy_and_build): Likewise.
1390 * tree.c (add_stmt_to_compound): Likewise.
1391 * typeck.c (finish_class_member_access_expr): Likewise.
1393 2008-07-17 Julian Brown <julian@codesourcery.com>
1394 Mark Mitchell <mark@codesourcery.com>
1396 * decl2.c (determine_visibility): Allow target to override
1397 visibility of class data.
1399 2008-07-17 Paolo Carlini <paolo.carlini@oracle.com>
1402 * semantics.c (trait_expr_value): Update __has_trivial_destructor
1403 semantics to the current WP (N2691).
1405 2008-07-16 Dodji Seketeli <dseketel@redhat.com>
1408 * name-lookup.c (lookup_extern_c_fun_binding_in_all_ns): New function.
1409 (pushdecl_maybe_friend): Check if a redeclaration of extern C function
1410 complies with exception specification constraints.
1412 2008-07-14 Jason Merrill <jason@redhat.com>
1414 * lex.c (init_reswords): Always set D_OBJC.
1416 2008-07-11 Tom Tromey <tromey@redhat.com>
1417 Ian Lance Taylor <iant@google.com>
1419 * lex.c (struct resword, reswords): Don't define.
1420 (D_EXT, D_ASM, D_OBJC, D_CXX0X): Don't define.
1421 (init_reswords): Clarify mask code. Use c_common_reswords rather
1424 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1427 * decl.c (grokdeclarator): Warn about initializing variables
1428 of storage class 'extern' only after the type of the declarator
1429 has been properly computed.
1431 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1434 * cp-tree.h (struct cp_decl_specifier_seq): Add a location field. It
1435 carries the location of the primary type.
1436 * parser.c (cp_parser_check_type_definition): Update documentation.
1437 (cp_parser_check_for_definition_in_return_type,
1438 cp_parser_check_for_invalid_template_id,
1439 cp_parser_set_decl_spec_type,
1440 cp_parser_check_for_definition_in_return_type,
1441 cp_parser_diagnose_invalid_type_name,
1442 cp_parser_new_expression, cp_parser_explicit_instantiation,
1443 cp_parser_type_specifier, cp_parser_simple_type_specifier,
1444 cp_parser_omp_for_loop, cp_parser_pragma): Use location in error
1447 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1451 * semantic.c (qualified_name_lookup_error, finish_id_expression):
1452 Add a location_t parameter so that
1453 error message can have a more accurate location.
1454 * cp-tree.h: Updated prototype
1455 * pt.c (tsubst_qualified_id): Use location in error messages.
1456 * parser.c (cp_parser_postfix_expression,
1457 cp_parser_objc_statement, cp_parser_trait_expr,
1458 cp_parser_token_is_class_key,
1459 cp_parser_uncommitted_to_tentative_parse_p,
1460 cp_parser_check_for_invalid_template_id, cp_parser_is_string_literal,
1461 cp_parser_error, cp_parser_name_lookup_error,
1462 cp_parser_simulate_error, cp_parser_check_decl_spec,
1463 cp_parser_check_decl_spec, cp_parser_non_integral_constant_expression,
1464 cp_parser_diagnose_invalid_type_name,
1465 cp_parser_parse_and_diagnose_invalid_type_name,
1466 cp_parser_require_pragma_eol, cp_parser_make_typename_type,
1467 cp_parser_string_literal, cp_parser_primary_expression,
1468 cp_parser_primary_expression, cp_parser_unqualified_id,
1469 cp_parser_nested_name_specifier_opt, cp_parser_postfix_expression,
1470 cp_parser_postfix_dot_deref_expression, cp_parser_new_expression,
1471 cp_parser_direct_new_declarator, cp_parser_builtin_offsetof,
1472 cp_parser_label_for_labeled_statement, cp_parser_statement_seq_opt,
1473 cp_parser_jump_statement, cp_parser_block_declaration,
1474 cp_parser_simple_declaration, cp_parser_decl_specifier_seq,
1475 cp_parser_function_specifier_opt, cp_parser_decltype,
1476 cp_parser_mem_initializer_list, cp_parser_mem_initializer,
1477 cp_parser_mem_initializer_id, cp_parser_template_parameter,
1478 cp_parser_type_parameter, cp_parser_template_id,
1479 cp_parser_template_name, cp_parser_template_argument): Likewise.
1481 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1484 * pt.c (tsubst_function_type): Remove warning for type qualifiers
1485 on function return type.
1487 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1490 * pt.c (tsubst_function_type): Don't warn for type qualifiers
1491 on function return type in case of system header.
1493 2008-07-09 Raksit Ashok <raksit@google.com>
1495 * parser.c (cp_parser_postfix_expression): New warning based on flag
1496 warn_disallowed_functions.
1498 2008-07-08 Simon Martin <simartin@users.sourceforge.net>
1501 * decl.c (grokdeclarator): Reset storage_class and staticp for friend
1502 functions declared with a storage class qualifier.
1504 2008-07-03 Richard Guenther <rguenther@suse.de>
1507 * typeck.c (cp_build_function_call): Move code to verify
1508 builtin function arguments ...
1509 * call.c (build_cxx_call): ... here.
1511 2008-07-02 Jason Merrill <jason@redhat.com>
1513 * Make-lang.in (cp/typeck2.o): Add $(REAL_H) dependency.
1515 Implement WG21 N2672, Initializer List proposed wording
1516 * cp-tree.h (enum cp_tree_index): Add CPTI_INIT_LIST_TYPE.
1517 (struct lang_type_class): Add has_list_ctor bitfield.
1518 (TYPE_HAS_LIST_CTOR): New macro.
1519 (BRACE_ENCLOSED_INITIALIZER_P): Expect init_list_type_node.
1520 (CONSTRUCTOR_IS_DIRECT_INIT): New macro.
1521 (LOOKUP_NO_NARROWING): New macro.
1522 (LOOKUP_NO_COPY_CTOR_CONVERSION): New macro.
1523 * parser.c (cp_parse_braced_list): Split out from...
1524 (cp_parser_initializer_clause): ...here.
1525 (cp_parser_postfix_expression): Build up CONSTRUCTOR for compound
1527 (cp_lexer_next_token_is_not_keyword): New fn.
1528 (cp_parser_parenthesized_expression_list): Handle { }.
1529 (cp_parser_new_expression, cp_parser_new_initializer): Likewise.
1530 (cp_parser_assignment_expression, cp_parser_condition): Likewise.
1531 (cp_parser_jump_statement, cp_parser_simple_declaration): Likewise.
1532 (cp_parser_mem_initializer, cp_parser_init_declarator): Likewise.
1533 (cp_parser_initializer, cp_parser_functional_cast): Likewise.
1534 (cp_parser_omp_for_loop, cp_parser_cache_group): Likewise.
1535 (cp_parser_save_member_function_body): Likewise.
1536 * call.c (conversion_kind): Add ck_list, ck_aggr.
1537 (struct conversion): Add check_narrowing bitfield, conversion list.
1538 (build_list_conv): New fn.
1539 (build_aggr_conv): New fn.
1540 (implicit_conversion): Call them.
1541 (standard_conversion): Set check_narrowing if appropriate.
1542 (add_function_candidate): Handle LOOKUP_NO_COPY_CTOR_CONVERSION.
1543 (build_user_type_conversion_1): When converting from an init list,
1544 we allow additional conversions except when calling a copy ctor.
1545 (convert_like_real): Calling an explicit ctor for an init list is
1546 ill-formed. Handle ck_list and ck_addr. Check narrowing.
1547 (build_new_method_call): If CONSTRUCTOR_IS_DIRECT_INIT is set and
1548 class doesn't have a list ctor, break the {} into a TREE_LIST.
1549 (compare_ics): ck_list is better than other UDCs.
1550 (set_up_extended_ref_temp): Split out from initialize_reference.
1551 (is_std_init_list): New fn.
1552 (is_list_ctor): New fn.
1553 * decl.c (cxx_init_decl_processing): Create init_list_type_node.
1554 (reshape_init_array_1): Pass it to build_constructor.
1555 (reshape_init_class): Ditto.
1556 (initialize_artificial_var): Pass the appropriate type.
1557 (build_aggr_init_full_exprs): Split out from...
1558 (check_initializer): ...here. Handle new semantics.
1559 (build_init_list_var_init): New subroutine of check_initializer.
1560 (grokdeclarator): Converting constructors can have more than one parm.
1561 (grok_special_member_properties): Set TYPE_HAS_LIST_CTOR.
1562 * init.c (expand_default_init): Only do digest_init for aggregates.
1563 * rtti.c (tinfo_base_init): Pass init_list_type_node to
1564 build_constructor_from_list.
1565 (generic_initializer, ptr_initializer): Ditto.
1566 (ptm_initializer, class_initializer): Ditto.
1567 (get_pseudo_ti_init): Ditto.
1568 * error.c (dump_type): Handle init_list_type_node.
1569 (maybe_warn_cpp0x): New fn.
1570 (maybe_varn_variadic_templates): Call it.
1571 * cvt.c (ocp_convert): Handle conversion from { }.
1572 * tree.c (build_array_of_n_type): New fn.
1573 * typeck2.c (store_init_value): Use init_list_type_node.
1574 (digest_init): Likewise.
1575 (check_narrowing): New fn.
1576 * semantics.c: (finish_compound_literal): Take CONSTRUCTOR instead
1577 of vector of constructor elts. Handle non-aggregate types. Make
1578 constant literals static.
1579 * pt.c: (tsubst_copy_and_build): Adjust.
1580 (unify): Handle { }.
1581 * name-lookup.c (arg_assoc_type): Handle init_list_type_node.
1583 2008-07-01 Daniel Jacobowitz <dan@codesourcery.com>
1585 * typeck.c (comp_ptr_ttypes_real): Use vector_targets_convertible_p.
1586 (comp_ptr_ttypes_const): Likewise.
1588 2008-07-01 Andrew Haley <aph@redhat.com>
1590 * decl.c (finish_constructor_body): Don't set the return value of
1591 the constructor if the constructor is that of a Java type.
1593 2008-06-30 Jakub Jelinek <jakub@redhat.com>
1596 * decl2.c (is_late_template_attribute): If the first attribute
1597 argument is IDENTIFIER_NODE, don't consider it when checking
1598 if arguments are value or type dependent.
1600 2008-06-29 Paolo Carlini <paolo.carlini@oracle.com>
1603 * pt.c (do_type_instantiation): In c++0x mode do not warn for
1606 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1608 * Make-lang.in (cp-warn): Delete $(CXX_COMPAT_WARN).
1610 2008-06-28 Jakub Jelinek <jakub@redhat.com>
1613 * repo.c (repo_emit_p): Put const static data members initialized
1614 by const expr into *.rpo file, just return 2 if IDENTIFIER_REPO_CHOSEN
1617 2008-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1620 * pt.c (do_decl_instantiation): In c++0x mode do not warn for
1623 2008-06-24 Jonathan Wakely <jwakely.gcc@gmail.com>
1626 * typeck.c (cp_build_function_call): Show example syntax in
1629 2008-06-21 Jonathan Wakely <jwakely.gcc@gmail.com>
1631 * typeck.c (composite_pointer_type_r, cxx_sizeof_expr,
1632 cxx_alignof_expr, check_template_keyword, cp_build_binary_op,
1633 pointer_diff, cp_build_unary_op, build_x_compound_expr_from_list,
1634 build_reinterpret_cast_1, cp_build_c_cast, check_return_expr): Change
1635 pedwarn to permerror.
1636 * init.c (perform_member_init, build_new_1, build_new): Likewise.
1637 * decl.c (warn_extern_redeclared_static, duplicate_decls,
1638 * identify_goto, check_previous_goto_1, check_goto, define_label,
1639 check_tag_decl, start_decl, check_class_member_definition_namespace,
1640 grokfndecl, grokdeclarator): Likewise.
1641 * except.c (check_handlers): Likewise.
1642 * typeck2.c (digest_init): Likewise.
1643 * pt.c (check_specialization_namespace,
1644 check_explicit_instantiation_namespace,
1645 maybe_process_partial_specialization, check_explicit_specialization,
1646 convert_template_argument, do_decl_instantiation,
1647 do_type_instantiation, instantiate_decl): Likewise.
1648 * semantics.c (finish_template_type_parm): Likewise.
1649 * name-lookup.c (pushdecl_maybe_friend,
1650 check_for_out_of_scope_variable): Likewise.
1651 * decl2.c (finish_static_data_member_decl, build_anon_union_vars,
1652 coerce_new_type): Likewise.
1653 * parser.c (cp_parser_nested_name_specifier_opt,
1654 cp_parser_mem_initializer, cp_parser_elaborated_type_specifier,
1655 cp_parser_class_head, cp_parser_check_class_key): Likewise.
1656 (cp_parser_parameter_declaration): Check flag_permissive instead of
1657 flag_pedantic_errors.
1658 * call.c (joust): Change pedwarn to warning.
1659 * friend.c (make_friend_class): Likewise.
1661 2008-06-16 Jan Hubicka <jh@suse.cz>
1663 * method.c: Include cgraph.h.
1664 (use_thunk): Use cgraph_add_new_function instead of calling backend
1667 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1669 * parser.c: Fix comment typo.
1671 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1674 * decl2.c (grokbitfield): Receive the list of attributes, pass it to
1675 grokdeclarator and apply it to the created declaration.
1676 * cp-tree.h (grokbitfield): Update prototype.
1677 * parser.c (cp_parser_member_declaration): Don't apply the attributes
1678 since they are now applied in grokbitfield. Adjusted the call to
1680 (cp_parser_objc_class_ivars): Likewise.
1682 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1685 * class.c (type_requires_array_cookie): Do not consider delete[]
1686 operators with an ellipsis as second argument.
1688 2008-06-09 Jakub Jelinek <jakub@redhat.com>
1691 * semantics.c (stmt_expr_value_expr): Don't crash on empty
1694 2008-06-08 Paolo Carlini <paolo.carlini@oracle.com>
1697 * pt.c (maybe_process_partial_specialization): Check the tree
1698 returned by push_template_decl for error_mark_node.
1699 * parser.c (cp_parser_class_head): Likewise, check the tree
1700 returned by the latter.
1702 2008-06-07 Paolo Carlini <paolo.carlini@oracle.com>
1705 * decl.c (grokdeclarator): In case of wrong return type return
1706 immediately error_mark_node.
1708 2008-06-06 Jakub Jelinek <jakub@redhat.com>
1710 * cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
1711 dependent_omp_for_p, begin_omp_task, finish_omp_task,
1712 finish_omp_taskwait): New prototypes.
1713 (cxx_omp_clause_default_ctor): Add outer argument.
1714 (finish_omp_for): Add new clauses argument.
1715 * cp-gimplify.c (cxx_omp_finish_clause): New function.
1716 (cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten.
1717 (cxx_omp_clause_default_ctor): Add outer argument.
1718 (cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
1719 * cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
1720 * parser.c (cp_parser_omp_for_loop): Parse collapsed for loops.
1721 Add par_clauses argument. If decl is present in parallel's
1722 lastprivate clause, change that clause to shared and add
1723 a lastprivate clause for decl to OMP_FOR_CLAUSES.
1724 Fix wording of error messages. Adjust finish_omp_for caller.
1725 Add clauses argument. Parse loops with random access iterators.
1726 (cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New
1728 (cp_parser_omp_for, cp_parser_omp_parallel): Adjust
1729 cp_parser_omp_for_loop callers.
1730 (cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper
1732 (cp_parser_omp_clause_name): Handle collapse and untied
1734 (cp_parser_omp_clause_schedule): Handle auto schedule.
1735 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
1736 and PRAGMA_OMP_CLAUSE_UNTIED.
1737 (OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE.
1738 (OMP_TASK_CLAUSE_MASK): Define.
1739 (cp_parser_omp_task, cp_parser_omp_taskwait): New functions.
1740 (cp_parser_omp_construct): Handle PRAGMA_OMP_TASK.
1741 (cp_parser_pragma): Handle PRAGMA_OMP_TASK and
1742 PRAGMA_OMP_TASKWAIT.
1743 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
1744 OMP_CLAUSE_UNTIED. Handle OMP_CLAUSE_LASTPRIVATE_STMT.
1745 (tsubst_omp_for_iterator): New function.
1746 (dependent_omp_for_p): New function.
1747 (tsubst_expr) <case OMP_FOR>: Use it. Handle collapsed OMP_FOR
1748 loops. Adjust finish_omp_for caller. Handle loops with random
1749 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR} changes.
1750 (tsubst_expr): Handle OMP_TASK.
1751 * semantics.c (cxx_omp_create_clause_info): New function.
1752 (finish_omp_clauses): Call it. Handle OMP_CLAUSE_UNTIED and
1753 OMP_CLAUSE_COLLAPSE.
1754 (cxx_omp_predetermined_sharing): Removed.
1755 * semantics.c (finish_omp_for): Allow pointer iterators. Use
1756 handle_omp_for_class_iterator and dependent_omp_for_p. Handle
1757 collapsed for loops. Adjust c_finish_omp_for caller. Add new
1758 clauses argument. Fix check for type dependent cond or incr.
1759 Set OMP_FOR_CLAUSES to clauses. Use cp_convert instead of
1760 fold_convert to convert incr amount to difference_type. Only
1761 fold if not in template. If decl is mentioned in lastprivate
1762 clause, set OMP_CLAUSE_LASTPRIVATE_STMT. Handle loops with random
1763 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR}
1765 (finish_omp_threadprivate): Allow static class members of the
1767 (handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
1768 finish_omp_taskwait): New functions.
1770 * parser.c (cp_parser_binary_expression): Add prec argument.
1771 (cp_parser_assignment_expression): Adjust caller.
1772 * cp-tree.h (outer_curly_brace_block): New prototype.
1773 * decl.c (outer_curly_brace_block): No longer static.
1775 2008-06-02 Paolo Carlini <paolo.carlini@oracle.com>
1778 * pt.c (push_template_decl_real): Consistently return error_mark_node
1781 2008-06-02 Tomas Bily <tbily@suse.cz>
1783 * typeck.c (is_bitfield_expr_with_lowered_type): Use CASE_CONVERT.
1784 (cp_build_unary_op): Likewise.
1785 (cp_build_indirect_ref): Use CONVERT_EXPR_P.
1786 (maybe_warn_about_returning_address_of_local): Likewise.
1788 2008-05-29 Paolo Carlini <paolo.carlini@oracle.com>
1791 * pt.c (tsubst_initializer_list): Consistently check the tree
1792 returned by tsubst_pack_expansion for error_mark_node.
1794 2008-05-27 Michael Matz <matz@suse.de>
1797 * call.c (build_new_op): Make warning conditional on
1800 2008-05-27 Alexandre Oliva <aoliva@redhat.com>
1803 * call.c (convert_like_real): Convert bitfield to desired type
1804 before creating temporary.
1806 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
1808 * Makefile.in: Adjusted dependencies on c-incpath.o.
1810 2008-05-23 Jakub Jelinek <jakub@redhat.com>
1813 * cp-gimplify.c (cxx_omp_clause_apply_fn): Call
1814 fold_build_cleanup_point_expr on build_call_a results.
1817 * semantics.c (omp_clause_info_fndecl): New function.
1818 (finish_omp_clauses): Use it.
1820 2008-05-21 Jakub Jelinek <jakub@redhat.com>
1823 * cp-tree.h (check_array_initializer): New prototype.
1824 * decl.c (check_array_initializer): New function.
1825 (check_initializer): Call it.
1826 * semantics.c (finish_compound_literal): Call it for ARRAY_TYPEs.
1828 2008-05-21 Tom Tromey <tromey@redhat.com>
1830 * mangle.c (save_partially_mangled_name): Remove.
1831 (restore_partially_mangled_name): Likewise.
1832 (write_encoding): Update.
1833 (write_unqualified_name): Likewise.
1834 (start_mangling): Always use name_obstack. Remove 'ident_p'
1836 (get_identifier_nocopy): Remove.
1837 (finish_mangling_internal): Rename from finish_mangling.
1838 (finish_mangling): New function.
1839 (finish_mangling_get_identifier): Likewise.
1840 (partially_mangled_name, partially_mangled_name_len): Remove.
1841 (mangle_decl_string): Change return type. Update.
1842 (mangle_decl, mangle_type_string, mangle_special_for_type,
1843 mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable,
1844 mangle_ref_init_variable): Update.
1846 2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
1849 * semantics.c (begin_class_definition): Extend checks on the first
1852 2008-05-12 Tomas Bily <tbily@suse.cz>
1854 * typeck2.c (digest_init): Use CONVERT_EXPR_P.
1855 * call.c (build_over_call): Likewise.
1856 * error.c (dump_expr): Use CASE_CONVERT.
1857 * class.c (fixed_type_or_null): Likewise.
1859 2008-05-11 Volker Reichelt <v.reichelt@netcologne.de>
1861 * parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
1863 (cp_parser_omp_clause_schedule): Remove superfluous "expected"
1866 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
1868 * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
1869 DECL_LOOPING_CONST_OR_PURE_P attributes.
1870 * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
1873 2008-05-02 Simon Baldwin <simonb@google.com>
1876 * typeck.c (build_array_ref): Remove warn_array_subscript_range.
1878 2008-05-01 Simon Baldwin <simonb@google.com>
1880 * typeck.c (build_array_ref): Call warn_array_subscript_range.
1882 2008-04-30 Jakub Jelinek <jakub@redhat.com>
1885 * pt.c (more_specialized_fn): Stop the loop even if there are no
1886 arguments before ellipsis.
1888 2008-04-29 Jakub Jelinek <jakub@redhat.com>
1891 * parser.c (cp_parser_lookup_name): Look through single function
1895 * typeck.c (cp_build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
1896 COMPOUND_EXPR if the second argument would be error_mark_node.
1898 2008-04-28 Jason Merrill <jason@redhat.com>
1899 Liu Guanwei <liu_gw@163.com>
1902 * parser.c (cp_parser_parameter_declaration): Handle < ambiguity
1903 in default arguments.
1905 2008-04-25 Jan Hubicka <jh@suse.cz>
1907 * typeck.c (check_return_expr): Update.
1908 * decl.c (start_preparsed_function): Update.
1909 * method.c (use_thunk): Update.
1911 2008-04-24 Jakub Jelinek <jakub@redhat.com>
1914 * cp-tree.h (cp_reconstruct_complex_type): New prototype.
1915 * cp-objcp-common.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
1916 * decl2.c (is_late_template_attribute): Only make vector_size
1917 late tmpl attribute if argument is type or value dependent.
1918 (cp_reconstruct_complex_type): New function.
1920 2008-04-24 Richard Guenther <rguenther@suse.de>
1922 * typeck.c (cp_build_function_call): Call
1923 check_builtin_function_arguments.
1925 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1927 * typeck.c (get_member_function_from_ptrfunc): Don't set TREE_INVARIANT.
1928 (build_ptrmemfunc1): Don't set TREE_INVARIANT.
1929 * init.c (build_zero_init): Don't set TREE_INVARIANT.
1930 * class.c (build_base_path): Don't set TREE_INVARIANT.
1931 (build_vtbl_ref_1): Don't set TREE_INVARIANT.
1932 (build_vtbl_initializer): Don't set TREE_INVARIANT.
1933 * decl.c (build_enumerator): Don't set TREE_INVARIANT.
1934 * rtti.c (tinfo_base_init): Don't set TREE_INVARIANT.
1935 (generic_initializer): Don't set TREE_INVARIANT.
1936 (ptr_initializer): Don't set TREE_INVARIANT.
1937 (ptm_initializer): Don't set TREE_INVARIANT.
1938 (class_initializer): Don't set TREE_INVARIANT.
1939 * typeck2.c (process_init_constructor): Don't set TREE_INVARIANT.
1940 * pt.c (push_inline_template_parms_recursive): Don't set TREE_INVARIANT.
1941 (build_template_parm_index): Don't set TREE_INVARIANT.
1942 (reduce_template_parm_level): Don't set TREE_INVARIANT.
1943 (process_template_parm): Don't set TREE_INVARIANT.
1945 2008-04-22 Jason Merrill <jason@redhat.com>
1948 * semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
1949 to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
1950 * typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
1952 2008-04-22 Jakub Jelinek <jakub@redhat.com>
1955 * semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
1956 expression is errorneous.
1958 2008-04-21 Jason Merrill <jason@redhat.com>
1961 * tree.c (cp_tree_equal): Handle FIXED_CST.
1964 * pt.c (template_template_parm_bindings_ok_p): Set
1965 processing_template_decl while in this function.
1967 2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
1969 * cvt.c (type_promotes_to): Support char16_t and char32_t.
1970 * decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
1971 char16_t and char32_t.
1972 * lex.c (reswords): Add char16_t and char32_t (for c++0x).
1973 * mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
1974 extended builtin type "u8char{16,32}_t".
1975 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
1977 (cp_lexer_print_token): Support CPP_STRING{16,32}.
1978 (cp_parser_is_string_literal): Idem.
1979 (cp_parser_string_literal): Idem.
1980 (cp_parser_primary_expression): Support CPP_CHAR{16,32} and
1982 (cp_parser_simple_type_specifier): Support RID_CHAR{16,32}.
1983 * tree.c (char_type_p): Support char16_t and char32_t as char types.
1984 * typeck.c (string_conv_p): Support char16_t and char32_t.
1986 2008-04-17 Jason Merrill <jason@redhat.com>
1989 * call.c (build_user_type_conversion_1): Represent second step of
1990 copy-init with an rvalue conversion.
1991 (convert_like_real) [ck_user]: Don't implicitly add it here.
1993 2008-04-15 Jakub Jelinek <jakub@redhat.com>
1996 * decl.c (layout_var_decl): If extern or static var has variable
1997 size, set TREE_TYPE (decl) to error_mark_node.
1999 2008-04-16 Danny Smith <dannysmith@users.sourceforge.net>
2002 * optimize.c (maybe_clone_body): Copy DECL_DLLIMPORT_P flag
2005 2008-04-09 Jason Merrill <jason@redhat.com>
2008 * semantics.c (finish_compound_literal): Return a TARGET_EXPR,
2009 not a pushed variable.
2011 2008-04-09 Volker Reichelt <v.reichelt@netcologne.de>
2013 * call.c (build_op_delete_call): Fix quotation in warning message.
2014 * decl.c (grokdeclarator): Quote keyword in error message.
2015 * pt.c (check_for_bare_parameter_packs): Fix quotation in error
2018 * parser.c (cp_parser_check_type_definition): Print error string
2019 directly rather than using "%s".
2020 (cp_parser_postfix_expression): Fix quotation.
2021 (cp_parser_decltype): Likewise.
2022 (cp_parser_sizeof_operand): Fix quotation. Simplify.
2024 * parser.c (cp_parser_non_integral_constant_expression): Build error
2025 message with CONCAT rather than using "%s".
2026 (cp_parser_primary_expression): Fix quotation.
2027 (cp_parser_postfix_expression): Likewise.
2028 (cp_parser_postfix_dot_deref_expression): Likewise.
2029 (cp_parser_unary_expression): Likewise.
2030 (cp_parser_new_expression): Likewise.
2031 (cp_parser_delete_expression): Likewise.
2033 * parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
2034 as `)', not as `('. Fix quotation.
2035 (cp_parser_consume_semicolon_at_end_of_statement): Fix quotation.
2036 (cp_parser_primary_expression): Likewise.
2037 (cp_parser_nested_name_specifier_opt): Likewise.
2038 (cp_parser_postfix_expression): Likewise.
2039 (cp_parser_postfix_open_square_expression): Likewise.
2040 (cp_parser_parenthesized_expression_list): Likewise.
2041 (cp_parser_pseudo_destructor_name): Likewise.
2042 (cp_parser_new_expression): Likewise.
2043 (cp_parser_direct_new_declarator): Likewise.
2044 (cp_parser_delete_expression): Likewise.
2045 (cp_parser_cast_expression): Likewise.
2046 (cp_parser_question_colon_clause): Likewise.
2047 (cp_parser_builtin_offsetof): Likewise.
2048 (cp_parser_trait_expr): Likewise.
2049 (cp_parser_label_for_labeled_statement): Likewise.
2050 (cp_parser_compound_statement): Likewise.
2051 (cp_parser_selection_statement): Likewise.
2052 (cp_parser_condition): Likewise.
2053 (cp_parser_iteration_statement): Likewise.
2054 (cp_parser_already_scoped_statement): Likewise.
2055 (cp_parser_simple_declaration): Likewise.
2056 (cp_parser_linkage_specification): Likewise.
2057 (cp_parser_static_assert): Likewise.
2058 (cp_parser_decltype): Likewise.
2059 (cp_parser_conversion_function_id): Likewise.
2060 (cp_parser_operator_function_id): Likewise.
2061 (cp_parser_operator): Likewise.
2062 (cp_parser_type_parameter): Likewise.
2063 (cp_parser_template_id): Likewise.
2064 (cp_parser_explicit_instantiation): Likewise.
2065 (cp_parser_explicit_specialization): Likewise.
2066 (cp_parser_enum_specifier): Likewise.
2067 (cp_parser_namespace_definition): Likewise.
2068 (cp_parser_namespace_alias_definition): Likewise.
2069 (cp_parser_using_declaration): Likewise.
2070 (cp_parser_using_directive): Likewise.
2071 (cp_parser_asm_definition): Likewise.
2072 (cp_parser_direct_declarator): Likewise.
2073 (cp_parser_ptr_operator): Likewise.
2074 (cp_parser_parameter_declaration_clause): Likewise.
2075 (cp_parser_initializer_clause): Likewise.
2076 (cp_parser_class_specifier): Likewise.
2077 (cp_parser_member_specification_opt): Likewise.
2078 (cp_parser_member_declaration): Likewise.
2079 (cp_parser_pure_specifier): Likewise.
2080 (cp_parser_constant_initializer): Likewise.
2081 (cp_parser_base_clause): Likewise.
2082 (cp_parser_exception_specification_opt): Likewise.
2083 (cp_parser_try_block): Likewise.
2084 (cp_parser_function_try_block): Likewise.
2085 (cp_parser_handler): Likewise.
2086 (cp_parser_throw_expression): Likewise.
2087 (cp_parser_asm_operand_list): Likewise.
2088 (cp_parser_attributes_opt): Likewise.
2089 (cp_parser_label_declaration): Likewise.
2090 (cp_parser_constructor_declarator_p): Likewise.
2091 (cp_parser_template_declaration_after_export): Likewise.
2092 (cp_parser_single_declaration): Likewise.
2093 (cp_parser_objc_message_expression): Likewise.
2094 (cp_parser_objc_message_args): Likewise.
2095 (cp_parser_objc_encode_expression): Likewise.
2096 (cp_parser_objc_defs_expression): Likewise.
2097 (cp_parser_objc_protocol_expression): Likewise.
2098 (cp_parser_objc_selector_expression): Likewise.
2099 (cp_parser_objc_protocol_refs_opt): Likewise.
2100 (cp_parser_objc_typename): Likewise.
2101 (cp_parser_objc_method_keyword_params): Likewise.
2102 (cp_parser_objc_superclass_or_category): Likewise.
2103 (cp_parser_objc_try_catch_finally_statement): Likewise.
2104 (cp_parser_objc_synchronized_statement): Likewise.
2105 (cp_parser_objc_throw_statement): Likewise.
2106 (cp_parser_omp_var_list_no_open): Likewise.
2107 (cp_parser_omp_clause_default): Likewise.
2108 (cp_parser_omp_clause_if): Likewise.
2109 (cp_parser_omp_clause_num_threads): Likewise.
2110 (cp_parser_omp_clause_reduction): Likewise.
2111 (cp_parser_omp_clause_schedule): Likewise.
2112 (cp_parser_omp_critical): Likewise.
2113 (cp_parser_omp_for_loop): Likewise.
2114 (cp_parser_omp_sections_scope): Likewise.
2116 * parser.c (cp_parser_template_parameter_list): Simplify.
2118 2008-04-07 James E. Wilson <wilson@tuliptree.org>
2120 * pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
2122 2008-04-07 Jason Merrill <jason@redhat.com>
2125 * class.c (type_has_user_nondefault_constructor): A template
2126 counts as a nondefault constructor.
2128 2008-04-04 Paolo Bonzini <bonzini@gnu.org>
2130 * decl.c (cxx_push_function_context): Delete.
2131 (cxx_pop_function_context): Delete.
2132 (start_preparsed_function): Merge cxx_push_function_context (!f->decl
2134 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_INIT,
2135 LANG_HOOKS_FUNCTION_FINAL): Delete.
2136 (LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P): Rename to
2137 LANG_HOOKS_MISSING_NORETURN_OK_P.
2138 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context):
2140 * semantics.c (current_stmt_tree): Fix comment.
2142 2008-04-03 Jakub Jelinek <jakub@redhat.com>
2145 * semantics.c (finish_offsetof): Undo effect of convert_from_reference
2146 before calling fold_offsetof.
2148 2008-04-03 Tom Tromey <tromey@redhat.com>
2150 * Make-lang.in (c++_OBJS): New variable.
2152 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
2154 * optimize.c (clone_body): New, from tree-inline.c.
2156 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
2158 * method.c (synthesize_method): Use {push,pop}_function_context.
2159 * name-lookup.c (push_to_top_level): Likewise.
2160 * parser.c (cp_parser_late_parsing_for_member): Likewise.
2162 2008-03-30 Volker Reichelt <v.reichelt@netcologne.de>
2165 * parser.c (cp_parser_decl_specifier_seq): Add location to error
2168 2008-03-27 Tom Tromey <tromey@redhat.com>
2170 * Make-lang.in: Revert automatic dependency patch.
2172 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
2175 * typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
2176 (build_compound_expr): New, for compatibility with C
2177 build_compound_expr.
2178 (cp_build_compound_expr): Renamed from build_compound_expr.
2179 (build_c_cast): New, for compatibility with C build_c_cast.
2180 (cp_build_c_cast): Renamed from build_c_cast.
2181 * init.c (build_vec_delete_1): Fix calls to build_compound_expr.
2182 * decl.c (cxx_maybe_build_cleanup): Ditto.
2183 * cp-tree.h (build_compound_expr): Add C-compatibile prototype.
2184 (cp_build_compound_expr): Renamed from build_compound_expr.
2185 (build_c_cast): Add C-compatible prototype.
2186 (cp_build_c_cast): Renamed from build_c_cast.
2187 * typeck2.c (build_functional_cast): Use cp_build_c_cast.
2188 * parser.c (cp_parser_cast_expression): Fix call to build_c_cast.
2190 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
2192 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Cope with
2193 tsubst_pack_expansion returning a pack expansion, or a TREE_VEC
2194 ending in a pack expansion, both of which can occur when
2195 substituting into a nested template.
2196 (tsubst_copy_and_build) <case SIZEOF_EXPR>: When we're
2197 instantiating the sizeof...(X) form, make tsubst_copy do the work.
2198 * parser.c (cp_parser_template_parameter): Deal with unnamed
2199 non-type template parameter packs identified by pack expansions in
2202 2008-03-26 Jakub Jelinek <jakub@redhat.com>
2205 * pt.c (apply_late_template_attributes): Don't call tsubst on
2206 first attribute argument if it is IDENTIFIER_NODE.
2209 * error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
2210 and LTGT_EXPR to pp_expression.
2212 2008-03-26 Douglas Gregor <doug.gregor@gmail.com>
2214 * pt.c (coerce_template_template_parm): Moved the body of the loop
2215 of coerce_template_template_parms here, to make iteration over a
2216 template argument pack simpler.
2217 Also, allow matching of a template parameter pack in the template
2218 template parameter to a template parameter in the template
2220 (coerce_template_template_parms): Deal with variadic template
2221 template parameters. Use coerce_template_template_parm.
2222 (unify): Make sure we coerce the template template argument's
2223 template arguments to the template template parameter's template
2224 parameters, not the other way around.
2226 2008-03-25 Tom Tromey <tromey@redhat.com>
2228 * Make-lang.in: Remove .o targets.
2229 (cp/g++spec.o): Moved to cp/. Reduce to variable setting.
2231 (c++_OBJS): New variable.
2232 (CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
2234 2008-03-25 Douglas Gregor <doug.gregor@gmail.com>
2236 * typeck.c (composite_pointer_type_r): Add SFINAE support.
2237 (composite_pointer_type): Ditto.
2238 (common_type): Fix call to composite_pointer_type.
2239 (cxx_sizeof_nowarn): New; used to be a macro.
2240 (cxx_sizeof_expr): Add SFINAE support.
2241 (cxx_alignof_expr): Ditto.
2242 (decay_conversion): Fix calls for SFINAE support.
2243 (rationalize_conditional_expr): Add SFINAE support.
2244 (build_class_member_access_expr): Ditto.
2245 (finish_class_member_access_expr): Ditto.
2246 (build_x_indirect_ref): Ditto.
2247 (build_indirect_ref): Original version renamed to
2248 cp_build_indirect_ref; new version provides a bridge from
2250 (cp_build_indirect_ref): Was build_indirect_ref; added SFINAE
2252 (get_member_function_from_ptrfunc): Fix calls for SFINAE support.
2253 (build_function_call): Original version renamed to
2254 cp_build_function_call; new version provides a bridge from
2256 (cp_build_function_call): Was build_function_call; added SFINAE
2258 (convert_arguments): Add SFINAE support.
2259 (build_x_binary_op): Ditto.
2260 (build_binary_op): Original version renamed to cp_build_binary_op;
2261 new version provides a bridge from c-common.
2262 (cp_build_binary_op): Was build_binary_op; added SFINAE support.
2263 (pointer_diff): Fix calls for SFINAE.
2264 (build_x_unary_op): Add SFINAE support.
2265 (condition_conversion): Fix calls for SFINAE.
2266 (build_unary_op): Original version renamed to cp_build_unary_op;
2267 new version provides a bridge from c-common.
2268 (cp_build_unary_op): Was build_unary_op; added SFINAE support.
2269 (unary_complex_lvalue): Fix calls for SFINAE.
2270 (build_x_conditional_expr): Add SFINAE support.
2271 (build_x_compound_expr_from_list): Fix calls for SFINAE.
2272 (build_x_compound_expr): Add SFINAE support.
2273 (convert_ptrmem): Fix calls for SFINAE.
2274 (build_static_cast_1): Add SFINAE support.
2275 (build_static_cast): Ditto.
2276 (build_reinterpret_cast_1): Ditto.
2277 (build_reinterpret_cast): Ditto.
2278 (build_const_cast_1): Ditto.
2279 (build_const_cast): Ditto.
2280 (build_c_cast): Ditto.
2281 (build_modify_expr): Original version renamed to
2282 cp_build_modify_expr; new version provides a bridge from c-common.
2283 (cp_build_modify_expr): Was build_modify_expr; added SFINAE
2285 (build_x_modify_expr): Add SFINAE support.
2286 (build_ptrmemfunc): Fix calls for SFINAE.
2287 (convert_for_assignment): Add SFINAE support.
2288 (convert_for_initialization): Ditto.
2289 (check_return_expr): Fix calls for SFINAE.
2290 (lvalue_or_else): Add SFINAE support.
2291 * init.c (perform_member_init): Fix calls for SFINAE.
2292 (emit_mem_initializers): Ditto.
2293 (expand_virtual_init): Ditto.
2294 (expand_cleanup_for_base): Ditto.
2295 (build_aggr_init): Add SFINAE support.
2296 (expand_default_init): Ditto.
2297 (expand_aggr_init_1): Fix calls for SFINAE.
2298 (build_offset_ref): Ditto.
2299 (build_new_1): Add SFINAE support.
2301 (build_vec_delete_1): Fix calls for SFINAE.
2302 (get_temp_regvar): Ditto.
2303 (build_vec_init): Add SFINAE support.
2304 (build_dtor_call): Fix calls for SFINAE.
2305 (build_delete): Ditto.
2306 (push_base_cleanups): Ditto.
2307 (build_vec_delete_1): Ditto.
2308 * class.c (build_base_path): Fix calls for SFINAE.
2309 (build_simple_base_path): Ditto.
2310 (convert_to_base_statically): Ditto.
2311 (build_vfn_ref): Ditto.
2312 (resolve_address_of_overloaded_function): Ditto.
2313 * decl.c (check_initializer): Fix calls for SFINAE.
2314 (register_dtor_fn): Ditto.
2315 (compute_array_index_type): Ditto.
2316 (finish_enum): Ditto.
2317 (start_preparsed_function): Ditto.
2318 (cxx_maybe_build_cleanup): Ditto.
2319 * call.c (convert_like): Add COMPLAIN argument.
2320 (convert_like_with_context): Ditto.
2321 (build_this): Fix calls for SFINAE.
2322 (build_user_type_conversion): Ditto.
2323 (resolve_args): Ditto.
2324 (build_new_function_call): Add SFINAE support.
2325 (build_operator_new_call): Fix calls for SFINAE.
2326 (build_object_call): Add SFINAE support.
2327 (build_conditional_expr): Ditto.
2328 (build_new_op): Ditto.
2329 (build_op_delete_call): Fix calls for SFINAE.
2330 (build_temp): Ditto.
2331 (convert_like_real): Add SFINAE support.
2332 (build_x_va_arg): Fix calls for SFINAE.
2333 (convert_default_arg): Ditto.
2334 (build_over_call): Add SFINAE support.
2335 (build_java_interface_fn_ref): Fix calls for SFINAE.
2336 (build_special_member_call): Add SFINAE support.
2337 (build_new_method_call): Ditto.
2338 (perform_implicit_conversion): Ditto.
2339 (perform_direct_initialization_if_possible): Ditto.
2340 (initialize_reference): Fix calls for SFINAE.
2341 * method.c (do_build_assign_ref): Fix calls for SFINAE.
2342 * rtti.c (build_headof): Fix calls for SFINAE.
2343 (get_tinfo_decl_dynamic): Ditto.
2344 (get_typeid): Ditto.
2345 (build_dynamic_cast_1): Add SFINAE support.
2346 (build_dynamic_cast): Ditto.
2347 (tinfo_base_init): Fix calls for SFINAE.
2348 * except.c (do_get_exception_ptr): Fix calls for SFINAE.
2349 (do_end_catch): Ditto.
2350 (initialize_handler_parm): Ditto.
2351 (expand_start_catch_block): Ditto.
2352 (do_allocate_exception): Ditto.
2353 (do_free_exception): Ditto.
2354 (build_throw): Ditto.
2355 * cvt.c (build_up_reference): Fix calls for SFINAE.
2356 (convert_to_reference): Ditto.
2357 (ocp_convert): Ditto.
2358 (convert_to_void): Add SFINAE support.
2359 * tree.c (build_dummy_object): Fix calls for SFINAE.
2360 (stabilize_expr): Ditto.
2361 * cp-tree.h (build_conditional_expr): Add tsubst_flags_t
2363 (build_new_method_call): Ditto.
2364 (build_special_member_call): Ditto.
2365 (build_new_op): Ditto.
2366 (perform_implicit_conversion): Ditto.
2367 (perform_direct_initialization_if_possible): Ditto.
2368 (convert_to_void): Ditto.
2369 (build_aggr_init): Ditto.
2371 (build_vec_init): Ditto.
2372 (build_dynamic_cast): Ditto.
2373 (finish_call_expr): Ditto
2374 (cxx_sizeof_or_alignof_expr): Add COMPLAIN parameter.
2375 (cxx_sizeof_nowarn): Remove macro; add function declaration.
2376 (build_class_member_access_expr): Add tsubst_flags_t parameter.
2377 (finish_class_member_access_expr): Ditto.
2378 (build_x_indirect_ref): Ditto.
2379 (cp_build_indirect_ref): New.
2380 (cp_build_function_call): Add tsubst_flags_t parameter.
2381 (build_x_unary_op): Ditto.
2382 (cp_build_unary_op): New.
2383 (build_x_conditional_expr): Add tsubst_flags_t parameter.
2384 (build_x_compound_expr): Ditto.
2385 (build_compound_expr): Ditto.
2386 (build_static_cast): Ditto.
2387 (build_reinterpret_cast): Ditto.
2388 (build_const_cast): Ditto.
2389 (build_c_cast): Ditto.
2390 (build_x_modify_expr): Ditto.
2391 (cp_build_modify_expr): New.
2392 (convert_for_initialization): Add tsubst_flags_t parameter.
2393 (cp_build_binary_op): Remove macro; add function declaration.
2394 (invalid_nonstatic_memfn_p): Add tsubst_flags_t parameter.
2395 (lvalue_or_else): Ditto.
2396 (build_functional_cast): Ditto.
2397 * typeck2.c (digest_init): Fix calls for SFINAE.
2398 (process_init_constructor_array): Ditto.
2399 (process_init_constructor_record): Ditto.
2400 (build_x_arrow): Ditto.
2401 (build_m_component_ref): Ditto.
2402 (build_functional_cast): Add SFINAE support.
2403 * pt.c (tsubst_copy_and_build): Add (more) SFINAE support.
2404 * semantics.c (simplify_loop_decl_cond): Fix calls for SFINAE.
2405 (finish_expr_stmt): Ditto.
2406 (finish_for_expr): Ditto.
2407 (finish_asm_stmt): Ditto.
2408 (finish_non_static_data_member): Ditto.
2409 (finish_qualified_id_expr): Ditto.
2410 (finish_call_expr): Add SFINAE support.
2411 (finish_increment_expr): Fix calls for SFINAE.
2412 (finish_unary_op_expr): Ditto.
2413 (simplify_aggr_init_expr): Ditto.
2414 (finish_omp_clauses): Ditto.
2415 (finish_omp_for): Ditto.
2416 (finish_omp_barrier): Ditto.
2417 (finish_omo_flush): Ditto.
2418 * decl2.c (grok_array_decl): Fix calls or SFINAE.
2419 (build_anon_union_vars): Ditto.
2420 (get_guard_cond): Ditto.
2422 (one_static_initialization_or_destruction): Ditto.
2423 (do_static_initialization_or_destruction): Ditto.
2424 (generate_ctor_or_dtor_function): Ditto.
2425 (build_offset_ref_call_from_tree): Ditto.
2426 * parser.c (cp_parser_postfix_expression): Fix calls for SFINAE.
2427 (cp_parser_postfix_dot_deref_expression): Ditto.
2428 (cp_parser_unary_expression): Ditto.
2429 (cp_parser_new_expression): Ditto.
2430 (cp_parser_cast_expression): Ditto.
2431 (cp_parser_binary_expression): Ditto.
2432 (cp_parser_question_colon_clause): Ditto.
2433 (cp_parser_assignment_expression): Ditto.
2434 (cp_parser_expression): Ditto.
2435 (cp_parser_builtin_offsetof): Ditto.
2436 (cp_parser_template_argument): Ditto.
2437 (cp_parser_functional_cast): Ditto.
2439 2008-03-24 Tom Tromey <tromey@redhat.com>
2441 * lex.c (handle_pragma_interface): Don't copy the filename.
2442 (handle_pragma_implementation): Copy filename using xstrdup.
2444 2008-03-21 Paolo Carlini <pcarlini@suse.de>
2446 * cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P.
2447 (SET_IS_AGGR_TYPE): Rename to SET_CLASS_TYPE_P.
2448 (IS_AGGR_TYPE_CODE): Rename to RECORD_OR_UNION_CODE_P.
2449 (PROMOTES_TO_AGGR_TYPE): Remove.
2450 (CLASS_TYPE_P, TYPE_NON_AGGREGATE_CLASS): Adjust.
2451 * typeck.c (unary_complex_lvalue, build_modify_expr,
2452 convert_for_initialization): Adjust.
2453 * init.c (is_aggr_type): Remove.
2454 (is_class_type): Add.
2455 (build_offset_ref, build_new_1, build_vec_delete_1, build_vec_init,
2456 build_delete): Adjust.
2457 * lex.c (make_aggr_type): Remove.
2458 (make_class_type): Add.
2459 (cxx_make_type): Adjust.
2460 * class.c (finish_struct_1, fixed_type_or_null, is_empty_class):
2462 * decl.c (build_typename_type, make_typename_type,
2463 make_unbound_class_template, cxx_init_decl_processing,
2464 check_tag_decl, groktypename, start_decl_1, layout_var_decl,
2465 check_initializer, cp_finish_decl, build_ptrmemfunc_type, grokparms,
2466 grok_op_properties, xref_tag, check_function_type): Adjust.
2467 * call.c (check_dtor_name, standard_conversion, implicit_conversion,
2468 add_builtin_candidate, add_builtin_candidates,
2469 build_user_type_conversion_1, convert_like_real, build_cxx_call,
2470 is_subseq, compare_ics): Adjust.
2471 * method.c (use_thunk): Adjust.
2472 * rtti.c (build_dynamic_cast_1, create_pseudo_type_info,
2473 create_tinfo_types): Adjust.
2474 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
2475 build_up_reference, convert_to_reference, convert_from_reference,
2476 ocp_convert, build_expr_type_conversion): Adjust.
2477 * tree.c (bind_template_template_parm, error_type): Adjust.
2478 * dump.c (cp_dump_tree): Adjust.
2479 * search.c (lookup_member): Adjust.
2480 * friend.c (make_friend_class, do_friend): Adjust.
2481 * typeck2.c (store_init_value, process_init_constructor_array,
2482 process_init_constructor_record, build_x_arrow, build_m_component_ref,
2483 build_functional_cast): Adjust.
2484 * pt.c (finish_member_template_decl, process_template_parm,
2485 lookup_template_class, tsubst_function_type, tsubst,
2486 tsubst_copy_and_build, get_template_base, bt_instantiate_type_proc):
2488 * semantics.c (begin_class_definition, finish_base_specifier,
2489 finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
2491 * name-lookup.c (constructor_name_p, push_overloaded_decl,
2492 do_class_using_decl, lookup_qualified_name,
2493 maybe_process_template_type_declaration): Adjust.
2494 * decl2.c (grok_array_decl, check_member_template,
2495 constrain_class_visibility): Adjust.
2496 * parser.c (cp_parser_class_name): Adjust.
2498 2008-03-18 Paolo Bonzini <bonzini@gnu.org>
2500 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
2502 2008-03-17 Jason Merrill <jason@redhat.com>
2505 * call.c (reference_binding): Check LOOKUP_NO_TEMP_BIND when binding
2506 a temp directly to a reference as per DR391.
2508 2008-03-12 Richard Guenther <rguenther@suse.de>
2512 2008-02-04 Richard Guenther <rguenther@suse.de>
2515 * decl.c (record_builtin_java_type): Make jboolean a
2516 integer type again where its mode doesn't match that of bool.
2518 2008-01-25 Richard Guenther <rguenther@suse.de>
2521 * decl.c (record_builtin_java_type): Make __java_boolean
2523 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
2524 after TYPE_MAIN_VARIANT check.
2526 2008-03-10 Jakub Jelinek <jakub@redhat.com>
2529 * semantics.c (finish_omp_clauses): Look through NOP_EXPR even
2533 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
2534 DECL_P in not a variable and appears more than once error messages.
2536 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
2540 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
2544 * typeck.c (structural_comptypes): Call cp_comptypes.
2545 (comptypes): New; called from the C/C++ common bits to perform
2547 (cp_comptypes): Renamed from comptypes, which is already used,
2548 with a different signature, by the C++ front end.
2549 (build_reinterpret_cast_1): Call cp_comptypes.
2550 (ptr_reasonably_similar): Ditto.
2551 * decl.c (decls_match): Ditto.
2552 * cvt.c (convert_to_reference): Ditto.
2553 * cp-tree.h (same_type_p): Ditto.
2554 (same_or_base_type_p): Ditto.
2555 (comptypes): Rename to cp_comptypes.
2556 * pt.c (canonical_type_parameter): Call cp_comptypes.
2558 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
2560 * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
2561 test for equivalence between pointer and references.
2563 2008-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2566 * class.c (finish_struct_anon): Use permerror instead of pedwarn.
2567 (check_field_decls): Likewise.
2568 (note_name_declared_in_class): Likewise.
2569 * call.c (build_new_op): Likewise.
2570 (convert_like_real): Likewise.
2571 (build_over_call): Likewise.
2572 * lex.c (unqualified_fn_lookup_error): Likewise.
2573 * parser.c (cp_parser_template_id): Likewise.
2574 * cvt.c (warn_ref_binding): Likewise.
2575 (convert_to_reference): Likewise.
2576 (ocp_convert): Likewise.
2577 (convert_to_void): Use error instead of pedwarn.
2578 * error.c (cp_cpp_error): Use pedantic_warning_kind.
2579 * decl.c (compute_array_index_type): Use constant_expression_error.
2581 2008-03-01 Douglas Gregor <doug.gregor@gmail.com>
2583 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Note
2584 that auto is either a storage class or a simple type specifier,
2585 depending on the dialect.
2586 (cp_parser_decl_specifier_seq): Complain about `auto' as a storage
2587 specifier in C++98 mode, error in C++0x mode (since we don't
2588 support auto as a type specifier, yet).
2589 (cp_parser_storage_class_specifier_opt): Don't treat `auto' as a
2590 storage specifier in C++0x mode.
2591 (cp_parser_simple_type_specifier): Parse `auto' as a
2592 simple-type-specifier, but error because we don't support it yet.
2594 2008-02-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2596 * parser.c (cp_parser_nonclass_name): New.
2597 (cp_parser_pseudo_destructor_name): Use it instead of
2598 cp_parser_type_name.
2599 (cp_parser_type_name): Move code to cp_parser_nonclass_name.
2601 2008-02-29 Tom Tromey <tromey@redhat.com>
2603 * parser.c (struct cp_token) <input_file_stack_index>: Remove.
2604 (cp_lexer_get_preprocessor_token): Update.
2605 (cp_lexer_set_source_position_from_token): Don't call
2606 restore_input_file_stack.
2607 * lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
2609 2008-02-28 Richard Guenther <rguenther@suse.de>
2612 2008-02-26 Richard Guenther <rguenther@suse.de>
2614 * decl.c (duplicate_decls): Remove decl from global mapping
2615 before ggc_freeing it.
2617 2008-02-27 Jakub Jelinek <jakub@redhat.com>
2620 * rtti.c: Include c-pragma.h.
2621 (push_abi_namespace, pop_abi_namespace): New functions.
2622 (build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
2623 create_tinfo_types, emit_support_tinfos): Use them.
2624 * Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
2626 2008-02-26 Jason Merrill <jason@redhat.com>
2629 * decl.c (grokdeclarator): Allow a typedef of an unnamed struct
2630 to name the struct for linkage purposes even if it has attributes.
2631 (start_decl): In that case, set ATTR_FLAG_TYPE_IN_PLACE.
2633 2008-02-26 Tom Tromey <tromey@redhat.com>
2635 * parser.c (eof_token): Remove old location code.
2636 (check_empty_body): Remove test of USE_MAPPED_LOCATION.
2637 * decl2.c (generate_ctor_or_dtor_function): Remove old location
2639 (cp_write_global_declarations): Likewise.
2640 * lex.c (cxx_init): Remove old location code.
2641 (handle_pragma_implementation): Remove test of
2642 USE_MAPPED_LOCATION.
2643 * pt.c (tsubst): Remove old location code.
2644 * error.c (cp_print_error_function): Remove test of
2645 USE_MAPPED_LOCATION.
2646 * decl.c (pop_label): Remove old location code.
2647 (finish_function): Likewise.
2649 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2652 * call.c (magic_varargs_p): Remove BUILT_IN_STDARG_START.
2654 2008-02-26 Richard Guenther <rguenther@suse.de>
2656 * decl.c (duplicate_decls): Remove decl from global mapping
2657 before ggc_freeing it.
2659 2008-02-26 Paolo Carlini <pcarlini@suse.de>
2662 * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
2664 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2666 * typeck.c (build_class_member_access_expr): Add appropriate
2667 OPT_W* parameter to warning.
2668 (build_reinterpret_cast_1): Likewise.
2669 * name-lookup.c (push_overloaded_decl): Likewise.
2671 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2674 * error.c (dump_expr): Handle CONJ_EXPR.
2676 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2679 * error.c (dump_type): Handle FIXED_POINT_TYPE.
2680 (dump_expr): Handle FIXED_CST.
2682 2008-02-24 Jason Merrill <jason@redhat.com>
2684 * parser.c (cp_parser_declaration): Handle "inline namespace".
2685 (cp_parser_namespace_definition): Likewise.
2688 * name-lookup.c (arg_assoc_namespace): Look down into inline
2691 2008-02-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2693 * typeck.c (check_for_casting_away_constness): Use 1 single
2694 argument, the type of cast, to decide what diagnostics generate.
2695 (build_static_cast_1): Remove unused code. Update call to
2696 check_for_casting_away_constness.
2697 (build_reinterpret_cast_1): Update call to
2698 check_for_casting_away_constness.
2699 (build_const_cast_1): Likewise.
2701 2008-02-24 Paolo Carlini <pcarlini@suse.de>
2703 * error.c (dump_expr): Don't deal directly with NEW_EXPR (and
2704 VEC_NEW_EXPR), forward to pp_expression.
2705 * cxx-pretty-print.c (pp_cxx_new_expression): Fix FIXME.
2707 2008-02-24 Danny Smith <dannysmith@users.sourceforge.net>
2710 * friend.c (do_friend): Call cplus_decl_attributes earlier.
2712 2008-02-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
2715 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
2716 template decls' function decl.
2718 2008-02-22 Paolo Carlini <pcarlini@suse.de>
2722 2008-02-14 Paolo Carlini <pcarlini@suse.de>
2725 * pt.c (determine_specialization): In case of function templates,
2726 when the type of DECL does not match FN there is no match.
2728 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2731 * typeck.c (build_binary_op): Warn about floating point
2732 comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
2734 2008-02-19 Jason Merrill <jason@redhat.com>
2737 * pt.c (resolve_overloaded_unification): Set processing_template_decl
2738 while we look for possible bindings.
2740 2008-02-19 Jakub Jelinek <jakub@redhat.com>
2743 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
2747 * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
2748 vars. Afterwards ensure v is VAR_DECL.
2751 * parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
2752 call cp_finish_decl.
2753 * semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
2756 2008-02-15 Douglas Gregor <doug.gregor@gmail.com>
2761 * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
2762 is error_mark_node, return an error early.
2763 (find_parameter_packs_r): Pass the pointer set along to recursive
2764 calls of cp_walk_subtrees; don't try to manage the pointer set
2766 (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
2767 (make_pack_expansion): Ditto.
2768 (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
2769 a second pass through the tree with find_parameter_packs_r; that
2770 second pass no longer does anything.
2771 (push_template_decl_real): If we have an erroneous declaration,
2772 set its type to error_mark_node before returning an error.
2774 2008-02-14 Douglas Gregor <doug.gregor@gmail.com>
2777 * pt.c (tsubst_initializer_list): Deal with the use of
2778 VOID_TYPE_NODE to indicate value-initialization of the bases.
2780 2008-02-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2781 Jason Merrill <jason@redhat.com>
2785 * class.c (type_has_user_nondefault_constructor): New fn.
2786 * cp-tree.h: Declare it.
2787 * init.c (emit_mem_initializers): Use it for -W warning about
2788 missing base initializer.
2790 2008-02-14 Paolo Carlini <pcarlini@suse.de>
2793 * pt.c (determine_specialization): In case of function templates,
2794 when the type of DECL does not match FN there is no match.
2796 2008-02-13 Jakub Jelinek <jakub@redhat.com>
2797 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2800 * parser.c (cp_parser_pseudo_destructor_name): If next tokens
2801 are not identifier :: ~, return before calling cp_parser_type_name.
2803 2008-02-13 Jason Merrill <jason@redhat.com>
2805 PR c++/34962, c++/34937, c++/34939
2806 * decl2.c (is_late_template_attribute): Always defer attributes
2807 vector_size and weak.
2810 * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
2811 of enumerators, too.
2813 2008-02-12 Jason Merrill <jason@redhat.com>
2816 * call.c (convert_like_real): Pass LOOKUP_NO_CONVERSION to build_temp
2817 if we're doing conversions to call a user-defined conversion function.
2819 2008-02-12 Steven Bosscher <steven@gcc.gnu.org>
2822 * semantics.c (finish_qualified_id_expr): Avoid duplicate access
2825 2008-02-12 Jakub Jelinek <jakub@redhat.com>
2828 * init.c (build_new_1): Don't create placement_expr before
2829 constructing alloc_call. Verify that the pointer is passed by
2830 value to operator new.
2832 2008-02-11 Jason Merrill <jason@redhat.com>
2835 * pt.c (tsubst): Don't look up a template typedef in an explicit
2838 2008-02-11 Douglas Gregor <doug.gregor@gmail.com>
2841 * tree.c (cp_build_qualified_type_real): When building a
2842 cv-qualified array type, build it as a unique type with
2843 build_cplus_array_type_1 and then adopt the unqualified type's
2846 2008-02-11 Paolo Carlini <pcarlini@suse.de>
2849 * decl.c (groktypename): Check grokdeclarator return.
2851 2008-02-10 Jason Merrill <jason@redhat.com>
2854 * decl2.c (cp_write_global_declarations): Don't write out static
2855 data members with DECL_IN_AGGR_P set.
2857 2008-02-08 Jason Merrill <jason@redhat.com>
2860 * tree.c (build_target_expr_with_type): Handle void initializer.
2861 (bot_manip): Remap slot before recursing.
2863 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2866 * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
2868 2008-02-06 Alexandre Oliva <aoliva@redhat.com>
2871 * tree.c: Include tree-flow.h.
2872 (build_target_expr): Check type compatibility.
2873 * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
2874 * call.c (convert_like_real): Convert bitfield to expected type.
2876 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
2880 * typeck.c (structural_comptypes): Call cp_comptypes.
2881 (comptypes): New; called from the C/C++ common bits to perform
2883 (cp_comptypes): Renamed from comptypes, which is already used,
2884 with a different signature, by the C++ front end.
2885 (build_reinterpret_cast_1): Call cp_comptypes.
2886 (ptr_reasonably_similar): Ditto.
2887 * decl.c (decls_match): Ditto.
2888 * cvt.c (convert_to_reference): Ditto.
2889 * cp-tree.h (same_type_p): Ditto.
2890 (same_or_base_type_p): Ditto.
2891 (comptypes): Rename to cp_comptypes.
2892 * pt.c (canonical_type_parameter): Call cp_comptypes.
2894 2008-02-05 Jakub Jelinek <jakub@redhat.com>
2897 * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
2898 value dependent expression.
2900 2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
2903 * decl2.c (save_template_attributes): When we're modifying the
2904 TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
2905 all of the other variants to add those same attributes. Otherwise,
2906 the main variant will be inconsistent with those other variants.
2908 2008-02-04 Richard Guenther <rguenther@suse.de>
2911 * decl.c (record_builtin_java_type): Make jboolean a
2912 integer type again where its mode doesn't match that of bool.
2914 2008-02-02 Jason Merrill <jason@redhat.com>
2915 Mark Mitchell <mark@codesourcery.com>
2918 * init.c (build_value_init_1): New function.
2919 (build_value_init): New function.
2920 * typeck2.c (build_functional_cast): Call it.
2921 * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
2923 * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from
2924 TYPE_HAS_CONSTRUCTOR.
2925 * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
2926 add_implicitly_declared_members): Adjust.
2927 (check_field_decls): Adjust. Remove warnings about reference/const
2928 in class without constructor.
2929 (check_bases_and_members): Adjust. Give those warnings here instead.
2930 * decl.c (fixup_anonymous_aggr): Adjust.
2931 (check_initializer): Adjust, clarify logic slightly.
2932 (grok_special_member_properties): Adjust, only set if user-provided.
2933 * rtti.c (create_tinfo_types): Don't set.
2934 * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
2935 Use same_type_ignoring_top_level_qualifiers_p.
2936 * pt.c (check_explicit_specialization): Adjust.
2937 (instantiate_class_template): Adjust.
2939 2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
2940 Jakub Jelinek <jakub@redhat.com>
2944 * typeck.c (structural_comptypes): Handle comparisons of
2945 VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
2947 * mangle.c (write_builtin_type): Map down to the canonical type,
2948 which will be one of the predefined type nodes.
2950 2008-01-29 Michael Meissner <michael.meissner@amd.com>
2953 * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
2954 bits to allow for expansion of the number of middle end tree
2957 2008-01-29 Douglas Gregor <doug.gregor@gmail.com>
2968 * typeck.c (check_return_expr): Tweak call to
2969 check_for_bare_parameter_packs.
2970 * class.c (add_method): Be careful with error_mark_nodes.
2971 * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
2973 * pt.c (struct find_parameter_pack_data): Remove
2975 (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
2976 (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
2977 (make_pack_expansion): Ditto.
2978 (check_for_bare_parameter_packs): Parameter is now a tree, not a
2980 (process_template_parm): Tweak call to
2981 check_for_bare_parameter_packs.
2982 (push_template_decl_real): Tweak calls to
2983 check_for_bare_parameter_packs. If bare parameter packs are found
2984 in the list of exceptions, clear out that list after giving an
2986 * semantics.c (finish_cond): Tweak call to
2987 check_for_bare_parameter_packs.
2988 (finish_expr_stmt): Ditto.
2989 (finish_for_expr): Ditto.
2990 (finish_switch_cond): Ditto.
2991 (finish_mem_initializers): Ditto.
2992 (finish_member_declaration): Ditto.
2993 (finish_static_assert): Check for bare parameter packs in the
2995 * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
2996 attributes of a declaration.
2997 * parser.c (cp_parser_using_declaration): Tweak call to
2998 check_for_bare_parameter_packs.
2999 (cp_parser_base_clause): Ditto.
3001 2008-01-28 Jason Merrill <jason@redhat.com>
3004 * class.c (build_base_path): Fix !want_pointer case.
3006 2008-01-27 Jason Merrill <jason@redhat.com>
3009 * class.c (build_base_path): Fix previous change.
3011 2008-01-26 Jakub Jelinek <jakub@redhat.com>
3014 * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
3017 2008-01-26 Richard Guenther <rguenther@suse.de>
3020 * typeck.c (build_binary_op): Remove code to shorten compares.
3022 2008-01-25 Richard Guenther <rguenther@suse.de>
3025 * decl.c (record_builtin_java_type): Make __java_boolean
3027 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
3028 after TYPE_MAIN_VARIANT check.
3030 2008-01-25 Jason Merrill <jason@redhat.com>
3033 * class.c (build_base_path): Don't mess with virtual access if
3035 * call.c (standard_conversion): Don't check whether source type
3038 * decl2.c (is_late_template_attribute): Don't defer attribute
3039 visibility just because the type is dependent.
3041 2008-01-25 Jason Merrill <jason@redhat.com>
3042 Mark Mitchell <mark@codesourcery.com>
3045 * call.c (standard_conversion): Allow conversion from integer/real
3047 (compare_ics): Such a conversion is worse than a normal arithmetic
3050 2008-01-25 Richard Guenther <rguenther@suse.de>
3053 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
3056 2008-01-24 Paolo Carlini <pcarlini@suse.de>
3059 * pt.c (push_template_decl_real): Return error_mark_node in case
3060 of template definition of non-template.
3062 2008-01-24 Jason Merrill <jason@redhat.com>
3065 * decl2.c (is_late_template_attribute): Defer any attribute with
3066 dependent args. Also defer type attributes if the type is dependent.
3068 2008-01-22 Jakub Jelinek <jakub@redhat.com>
3069 Alexandre Oliva <aoliva@redhat.com>
3072 * call.c (reference_binding): For bitfields use the declared bitfield
3074 (add_builtin_candidates): Likewise.
3075 * class.c (layout_class_type): For bitfields copy over the
3076 original type quals.
3078 2008-01-22 Jason Merrill <jason@redhat.com>
3081 * decl.c (groktypename): Also ignore attributes on dependent
3082 possibly-class types.
3085 * friend.c (do_friend): Check for prior declaration of a friend
3086 function of a local class.
3087 * name-lookup.c (lookup_name_innermost_nonclass_level):
3089 * name-lookup.h: Declare it.
3091 2008-01-22 Tom Tromey <tromey@redhat.com>
3094 * init.c (build_new_1): Only disallow Java aggregates.
3096 2008-01-22 Jakub Jelinek <jakub@redhat.com>
3099 * semantics.c (finish_omp_for): Don't call c_finish_omp_for
3100 if decl or init is error_mark_node.
3103 * error.c (dump_expr): Handle VECTOR_CST.
3105 2008-01-21 Jason Merrill <jason@redhat.com>
3108 * pt.c (tsubst_aggr_type): Make sure our context is complete.
3111 * pt.c (retrieve_local_specialization): Robustify.
3112 (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
3115 * pt.c (tsubst): Only call retrieve_local_specialization if the
3116 original typedef was in a function template.
3119 * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
3121 2008-01-21 Richard Guenther <rguenther@suse.de>
3124 * error.c (cp_print_error_function): Deal with recursive
3127 2008-01-20 Paolo Carlini <pcarlini@suse.de>
3130 * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
3132 2008-01-20 Paolo Carlini <pcarlini@suse.de>
3136 * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
3137 on non-IS_AGGR_TYPE scope.
3138 (constructor_name_p): Assert IS_AGGR_TYPE.
3140 2008-01-18 Ian Lance Taylor <iant@google.com>
3143 * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
3144 (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
3145 DECL_IS_OPERATOR_NEW flag.
3147 2008-01-16 Richard Guenther <rguenther@suse.de>
3150 * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
3151 for conversions to type variants.
3153 2008-01-15 Andreas Tobler <a.tobler@schweiz.org>
3155 * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
3156 declaration and code. Update copyright year.
3158 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3161 * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
3162 know we have a class type.
3164 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3167 * pt.c (coerce_template_parameter_pack): When substituting into
3168 the type of a non-type template parameter pack. use the
3169 deduced/substituted arguments.
3170 * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
3171 can be a parameter pack with the ellipsis following it. When we
3172 have an erroneous declaration, allow it to be a parameter pack.
3173 (cp_parser_template_parameter): Complain about default
3174 arguments on non-type template parameter packs, and parse them
3175 using the new cp_parser_default_argument.
3176 (cp_parser_parameter_declaration): Complain about parameter packs
3177 with default arguments. Move parsing of default arguments into a
3178 new function, cp_parser_default_argument.
3179 (cp_parser_default_argument): New; extracted from
3180 cp_parser_parameter_declaration.
3182 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3188 * typeck.c (check_return_expr): If there are bare parameter packs
3189 in the return value, set it to error_mark_node.
3190 * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
3191 * pt.c (find_parameter_packs_r): Look at the type of
3192 IDENTIFIER_NODEs (e.g., for user-defined conversions).
3193 (check_for_bare_parameter_packs): Flip the result: now returns
3194 TRUE when there were bare parameter packs, FALSE otherwise.
3195 (push_template_decl_real): Deal with flipped result of
3196 check_for_bare_parameter_packs.
3197 * semantics.c (finish_cond): If there are bare parameter packs in
3198 the conditional, set it to error_mark_node.
3199 (finish_expr_stmt): If there are bare parameter packs in the
3200 expression, set it to error_mark_node.
3201 (finish_for_expr): Ditto.
3202 (finish_switch_cond): If there are bare parameter packs in
3203 the conditional, set it to error_mark_node.
3204 (finish_mem_initializers): If there are bare parameter packs in
3205 the member initializer, set it to error_mark_node.
3206 (finish_member_declaration): Check the attributes of the
3207 declaration for bare parameter packs, and remove the attributes if
3208 any have bare parameter packs.
3209 * parser.c (cp_parser_using_declaration): Check the using
3210 declaration for bare parameter packs.
3211 (cp_parser_base_clause): If there are bare parameter packs in a
3212 base specifier, don't add it to the chain.
3214 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3217 * error.c (dump_simple_decl): Display ellipsis for template
3218 non-type parameter packs.
3219 (dump_decl): Display ellipsis for template type parameter packs.
3220 (dump_template_decl): Display ellipsis for template template
3222 * pt.c (redeclare_class_template): When redeclaring a class
3223 template, check for collisions between template parameters and
3224 template parameter packs.
3226 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3229 * pt.c (process_partial_specialization): Don't mark template
3230 parameters that occur in non-deduced contexts.
3231 (struct pair_fn_data): Add include_nondeduced_p.
3232 (for_each_template_parm_r): Only visit non-deduced contexts if
3233 include_nondeduced_p is set.
3234 (for_each_template_parm): Added parameter include_nondeduced_p,
3235 which states whether template parameters found in non-deduced
3236 contexts should be visited.
3237 (uses_template_parms): Visit all template parameters, even those
3238 in non-deduced contexts.
3240 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3243 * pt.c (check_default_tmpl_args): Check for parameter packs that
3244 aren't at the end of a primary template.
3245 (push_template_decl_real): Remove check for parameter packs that
3246 aren't at the end of a primary template; that now happens in
3247 check_default_tmpl_args.
3248 * semantics.c (finish_template_template_parm): Use
3249 check_default_tmpl_args to check for errors in the template
3252 2008-01-12 Doug Kwan <dougkwan@google.com>
3254 * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
3255 instead of OPT_Wreturn_type in warning due to ignored return type
3257 * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
3258 instead of OPT_Wreturn_type in warning due to ignored return type
3261 2008-01-08 Jakub Jelinek <jakub@redhat.com>
3264 * semantics.c (finish_omp_for): Don't call
3265 fold_build_cleanup_point_expr if processing_template_decl.
3267 2008-01-04 Paolo Carlini <pcarlini@suse.de>
3268 Jakub Jelinek <jakub@redhat.com>
3271 * error.c (dump_template_argument): Deal with TREE_LIST.
3273 2008-01-01 Douglas Gregor <doug.gregor@gmail.com>
3275 * parser.c (cp_parser_check_decl_spec): Don't warn about "long
3276 long" in C++0x mode; change the warning to note that "long long"
3277 is only unsupported in C++98 mode.
3279 2007-12-20 Jason Merrill <jason@redhat.com>
3282 * call.c (standard_conversion): Derived-to-base is considered a
3283 standard conversion.
3285 2007-12-19 Jakub Jelinek <jakub@redhat.com>
3288 * parser.c (cp_parser_omp_parallel): For non-combined parallel
3289 call cp_parser_statement rather than
3290 cp_parser_already_scoped_statement.
3292 2007-12-18 Jason Merrill <jason@redhat.com>
3295 * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
3297 (dependent_type_p_r): Handle the domain of an array.
3299 2007-12-18 Douglas Gregor <doug.gregor@gmail.com>
3300 Jakub Jelinek <jakub@redhat.com>
3305 * pt.c (template_template_parm_bindings_ok_p): New; verifies
3306 bindings of template template parameters after all template
3307 arguments have been deduced.
3308 (coerce_template_parms): Don't complain when COMPLAIN doesn't
3310 (fn_type_unification): Use template_template_parm_bindings_ok_p.
3311 (unify): Deal with variadic, bound template template parameters.
3312 (get_class_bindings): Use template_template_parm_bindings_ok_p.
3314 2007-12-18 Jakub Jelinek <jakub@redhat.com>
3317 * decl.c (grokdeclarator): Reject friend sfk_constructor
3320 2007-12-17 Jakub Jelinek <jakub@redhat.com>
3323 * parser.c (cp_parser_omp_all_clauses): Accept optional comma
3326 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
3329 * cp-lang.c (cp_classify_record): New.
3330 (LANG_HOOKS_CLASSIFY_RECORD): Override.
3332 2007-12-11 Jakub Jelinek <jakub@redhat.com>
3335 * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
3338 * rtti.c (build_dynamic_cast): Call convert_from_reference even for
3339 dynamic_cast in a template.
3341 2007-12-10 Simon Martin <simartin@users.sourceforge.net>
3344 * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
3345 MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
3347 2007-12-10 Jakub Jelinek <jakub@redhat.com>
3350 * error.c (dump_type_prefix, dump_type_suffix): Handle
3351 TYPE_PACK_EXPANSION.
3354 * error.c (dump_expr): Handle ABS_EXPR.
3356 2007-12-09 Jakub Jelinek <jakub@redhat.com>
3360 * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
3361 in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
3362 Return 2 also if DECL_EXPLICIT_INSTANTIATION.
3363 * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
3364 flag_use_repository and repo_emit_p returned 2.
3366 2007-12-06 Jakub Jelinek <jakub@redhat.com>
3369 * tree.c (stabilize_call, stabilize_init): Do nothing if
3370 processing_template_decl.
3372 2007-12-05 Jakub Jelinek <jakub@redhat.com>
3375 * semantics.c (finish_decltype_type): For SCOPE_REF issue an
3376 error instead of assertion failure.
3377 * parser.c (cp_parser_decltype): If closing paren is not found,
3378 return error_mark_node.
3380 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3383 * name-lookup.c (arg_assoc_template_arg): Recurse on argument
3385 (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
3386 since arg_assoc_template_arg will deal with them (better).
3388 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3391 * pt.c (tsubst_exception_specification): Handle substitutions into
3392 member templates, where tsubst_pack_expansion returns a
3393 TYPE_PACK_EXPANSION.
3395 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3398 * pt.c (unify_pack_expansion): If we didn't deduce any actual
3399 bindings for the template parameter pack, don't try to keep the
3400 empty deduced arguments.
3401 (unify): If a parameter is a template-id whose template argument
3402 list contains a pack expansion that is not at the end, then we
3403 cannot unify against that template-id.
3405 2007-12-02 Paolo Carlini <pcarlini@suse.de>
3408 * pt.c (current_template_args): Use error_operand_p.
3410 2007-12-02 Paolo Carlini <pcarlini@suse.de>
3413 * error.c (dump_decl): Handle TREE_BINFO.
3415 2007-12-01 Ollie Wild <aaw@google.com>
3418 * typeck.c (build_binary_op): Add conversion of pointers to function
3419 members appearing as operands to the equality operators.
3421 2007-11-30 Jakub Jelinek <jakub@redhat.com>
3424 * error.c (dump_expr): Handle OBJ_TYPE_REF.
3426 2007-11-29 Jakub Jelinek <jakub@redhat.com>
3429 * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
3431 * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
3436 * parser.c (cp_parser_decltype): Don't call finish_id_expression
3438 * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
3441 2007-11-27 Jakub Jelinek <jakub@redhat.com>
3443 PR tree-optimization/34181
3444 * method.c (use_thunk): Don't inline the call in the thunk.
3447 * tree.c (decl_linkage): Static data members and static member
3448 functions in anonymous ns classes are lk_external.
3450 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
3453 * decl.c (start_preparsed_function): Pass
3454 processing_template_decl for the new allocate_struct_function
3457 2007-11-25 Richard Guenther <rguenther@suse.de>
3459 * decl.c (poplevel): Use BLOCK_CHAIN.
3461 2007-11-24 Ollie Wild <aaw@google.com>
3463 * typeck.c (delta_from_ptrmemfunc): New function.
3464 (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
3465 (build_binary_op): Call delta_from_ptrmemfunc.
3467 2007-11-23 Jakub Jelinek <jakub@redhat.com>
3471 * decl.c (cp_finish_decl): Disallow variable or field
3472 definitions if extern "Java" aggregates.
3473 (grokparms): Disallow parameters with extern "Java"
3475 (check_function_type): Disallow function return values
3476 with extern "Java" aggregates.
3477 * init.c (build_new_1): Disallow placement new with
3478 extern "Java" aggregates.
3480 2007-11-23 Mark Mitchell <mark@codesourcery.com>
3481 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3484 * call.c (convert_like_real): Build a zero constant when __null is
3485 converted to an integer type.
3487 2007-11-22 Jakub Jelinek <jakub@redhat.com>
3490 * decl2.c (cp_write_global_declarations): Issue error about static
3491 data members in anonymous namespace which are declared and used,
3494 2007-11-20 Jakub Jelinek <jakub@redhat.com>
3497 * parser.c (cp_parser_class_head): Reject function template ids.
3500 * tree.c (build_cplus_array_type_1): Don't pass any VLA types
3501 when processing_template_decl to build_array_type.
3504 * pt.c (more_specialized_fn): Don't segfault if one or
3505 both argument list end with ellipsis.
3507 2007-11-18 Jakub Jelinek <jakub@redhat.com>
3510 * semantics.c (finish_call_expr): Set
3511 current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
3512 or OVERLOAD with all noreturn functions.
3514 2007-11-16 Jakub Jelinek <jakub@redhat.com>
3517 * pt.c (apply_late_template_attributes): Do nothing if decl's type is
3520 2007-11-13 Jakub Jelinek <jakub@redhat.com>
3527 * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
3528 set to error_mark_node the outermost POINTER_TYPE to the pack if
3529 it is seen in a POINTER_TYPE.
3530 (push_template_decl_real): If check_for_bare_parameter_packs
3531 fails for function return type, set the return type to
3532 integer_type_node. If check_for_bare_parameter_packs failed
3533 for non-function, return error_mark_node.
3536 * call.c (build_new_op): Call resolve_args before calling
3539 2007-11-11 Tom Tromey <tromey@redhat.com>
3542 * lex.c (handle_pragma_implementation): Use cpp_included_before.
3544 2007-11-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3547 * pt.c (redeclare_class_template): Update error message. Use a
3548 note to show the previous declaration.
3549 (tsubst_friend_class): Use the location of the friend template as
3550 the input location before calling redeclare_class_template.
3552 2007-11-11 Jakub Jelinek <jakub@redhat.com>
3555 * semantics.c (finish_pseudo_destructor_expr): Handle
3556 object == error_mark_node.
3558 2007-11-10 Jakub Jelinek <jakub@redhat.com>
3561 * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
3562 is not scalar type, let finish_class_member_access_expr handle
3563 diagnostics. Pass BIT_NOT_EXPR argument to
3564 finish_pseudo_destructor_expr. Handle SCOPE_REF properly.
3566 2007-11-09 Douglas Gregor <doug.gregor@gmail.com>
3569 * decl.c (cp_complete_array_type): If any of the initializer
3570 elements are pack expansions, don't compute the array size yet.
3572 2007-11-08 Andrew Pinski <pinskia@gmail.com>
3575 * tree.c (decl_linkage): Fields have no linkage.
3577 2007-11-08 Daniel Jacobowitz <dan@codesourcery.com>
3579 * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
3581 2007-11-07 Douglas Gregor <doug.gregor@gmail.com>
3586 * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
3587 Be careful with ERROR_MARK_NODEs.
3588 * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
3591 2007-11-07 Jakub Jelinek <jakub@redhat.com>
3594 * call.c (build_over_call): Don't check TREE_ADDRESSABLE
3597 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
3601 * tree.c (c_build_qualified_type): Define bridge to
3602 cp_build_qualified_type.
3604 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
3615 * typeck.c (check_return_expr): Pass address of retval to
3616 check_for_bare_parameter_packs.
3617 * class.c (build_base_field): Tolerate bases that have no layout
3619 (end_of_base): Ditto.
3620 * tree.c (canonical_type_variant): Be careful with
3622 * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
3624 * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
3625 which states whether parameter packs should be replaced with
3627 (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
3628 possible. If set_packs_to_error is set true, replace the parameter
3629 pack with ERROR_MARK_NODE. Manage our own pointer sets.
3630 (uses_parameter_packs): Don't set parameter packs to
3632 (check_for_bare_parameter_packs): Now takes a pointer to a tree,
3633 which may be modified (if it is a parameter pack). Instructs
3634 find_parameter_packs_r to replace parameter packs with
3635 ERROR_MARK_NODE (so that they won't cause errors later on).
3636 (process_template_parm): Pass pointer to
3637 check_for_bare_parameter_packs.
3638 (process_partial_specialization): Replace pack expansions before
3639 the end of the template argument list with ERROR_MARK_NODE.
3640 (push_template_decl_real): Pass pointer to
3641 check_for_bare_parameter_packs. Replace parameter packs not at the
3642 end of the template parameter list with ERROR_MARK_NODE.
3643 (convert_template_argument): Be more careful about using DECL_NAME
3644 on only declarations.
3645 (unify): Can't unify against ERROR_MARK_NODE.
3646 * semantics.c (finish_cond): Pass pointer to
3647 check_for_bare_parameter_packs.
3648 (finish_expr_stmt): Ditto.
3649 (finish_for_expr): Ditto.
3650 (finish_switch_cond): Pass pointer to
3651 check_for_bare_parameter_packs, and call it before we put the
3652 condition into the statement.
3653 (finish_mem_initializers): Pass pointer to
3654 check_for_bare_parameter_packs.
3655 (finish_member_declaration): Ditto.
3656 * parser.c (cp_parser_base_clause): Ditto.
3658 2007-11-06 Jakub Jelinek <jakub@redhat.com>
3661 * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
3662 with the final TREE_READONLY flag in place. processing_template_decl
3663 is known to be 0 in this part of function.
3666 * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
3667 OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
3668 * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
3669 * semantics.c (finish_omp_atomic): Revert most of the
3670 2007-02-05 changes, just keep the new representation of
3671 OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
3673 2007-11-05 H.J. Lu <hongjiu.lu@intel.com>
3676 * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
3679 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
3684 * typeck.c (merge_types): Don't lose rvalue references when
3686 * call.c (build_over_call): Don't elide move constructors just
3687 because the copy constructor is trivial (!).
3688 (compare_ics): If comparing cv-qualifiers fails, we can still order
3689 based on binding lvalues vs. rvalues.
3691 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
3694 * pt.c (unify_pack_expansion): bring handling of function call
3695 arguments into line with type_unification_real.
3697 2007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3699 * typeck.c (build_binary_op): Use pedwarn instead of error for
3702 2007-11-05 Jakub Jelinek <jakub@redhat.com>
3705 * parser.c (cp_parser_unary_expression): For &&label call
3706 cp_parser_non_integral_constant_expression and return error_mark_node
3707 if it returned true.
3710 * decl.c (grokdeclarator): Don't call build_memfn_type if type
3711 is neither FUNCTION_TYPE nor METHOD_TYPE.
3713 2007-11-02 Jakub Jelinek <jakub@redhat.com>
3716 * parser.c (cp_parser_nested_name_specifier_opt): Use
3717 TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
3718 typedef of currently open class.
3720 2007-11-02 Paolo Carlini <pcarlini@suse.de>
3723 * error.c (dump_expr): Deal specially with statements.
3725 2007-11-01 Jason Merrill <jason@redhat.com>
3728 * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
3730 (lookup_template_class): Use it to get the outer template args
3731 for instantiating one.
3734 * pt.c (reduce_template_parm_level): tsubst the parameters
3735 of a template template parm.
3737 2007-11-01 Douglas Gregor <doug.gregor@gmail.com>
3740 * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
3742 2007-11-01 Jakub Jelinek <jakub@redhat.com>
3745 * parser.c (cp_parser_postfix_dot_deref_expression): If
3746 POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
3747 first and if that succeeds and type is SCALAR_TYPE_P, create
3751 * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
3752 (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
3753 as for std::type_info.
3755 2007-10-31 Paolo Carlini <pcarlini@suse.de>
3758 * cxx-pretty-print.c (pp_cxx_typeid_expression,
3759 pp_cxx_delete_expression): Change to static linkage.
3760 * cxx-pretty-print.h: Adjust declarations.
3761 * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
3762 MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
3763 MODOP_EXPR): Forward to pp_expression.
3765 * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
3768 2007-10-31 Christian Bruel <christian.bruel@st.com>
3769 Mark Mitchell <mark@codesourcery.com>
3772 * typeck.c (check_return_expr): Don't set named_return_value_okay_p
3773 if retval is volatile.
3775 2007-10-30 Jakub Jelinek <jakub@redhat.com>
3778 * decl2.c (build_offset_ref_call_from_tree): Call
3779 build_non_dependent_expr on object prior to building ADDR_EXPR from it
3780 if FN is DOTSTAR_EXPR.
3782 2007-10-30 Douglas Gregor <doug.gregor@gmail.com>
3786 * pt.c (find_parameter_packs_r): Fix typo in comment.
3787 (convert_template_argument): Look at the pattern of a pack
3788 expansion to determine what kind of entity we're converting.
3789 (coerce_template_parameter_pack): When we have coerced a non-type
3790 template parameter pack, substitute into the type of that pack.
3791 (tsubst_pack_expansion): When our substitution of a parameter pack
3792 is a "trivial" substitution of itself, just substitute into the
3793 pack expansion rather than actually expanding.
3795 2007-10-29 Jakub Jelinek <jakub@redhat.com>
3798 * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
3799 for non-integral type bitfields. Return true if bitfield is correct, false
3800 error has been diagnosed.
3801 (check_field_decls): If check_bitfield_decl returned false, call also
3804 2007-10-28 Paolo Carlini <pcarlini@suse.de>
3805 Mark Mitchell <mark@codesourcery.com>
3808 * pt.c (do_decl_instantiation): If the VAR_DECL is not a
3809 class member error out and return.
3811 2007-10-27 Jakub Jelinek <jakub@redhat.com>
3813 * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
3814 to current_function_decl rather than 0.
3817 * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
3819 * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
3821 2007-10-27 Jason Merrill <jason@redhat.com>
3824 * call.c (convert_default_arg): Detect recursion.
3826 2007-10-27 Jakub Jelinek <jakub@redhat.com>
3829 * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
3830 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
3832 (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
3834 * error.c (dump_expr): Handle OFFSETOF_EXPR.
3836 2007-10-26 Jason Merrill <jason@redhat.com>
3839 * pt.c (get_template_info): New fn.
3840 (template_class_depth): Use it.
3841 (push_template_decl_real): Check that the template args of the
3842 definition match the args of the previous declaration.
3844 2007-10-26 Paolo Carlini <pcarlini@suse.de>
3847 * decl2.c (coerce_new_type): Do not allow a default argument for
3848 the first parameter.
3850 2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
3853 * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
3854 don't see the leading '('. Only lookup names if we get an
3857 2007-10-26 Jakub Jelinek <jakub@redhat.com>
3860 * parser.c (cp_parser_parenthesized_expression_list): Set
3861 greater_than_is_operator_p to true in between the parens.
3863 2007-10-26 Paolo Carlini <pcarlini@suse.de>
3866 * decl.c (grokdeclarator): In case of conflicting specifiers
3867 just return error_mark_node.
3869 2007-10-26 Ollie Wild <aaw@google.com>
3871 * expr.c (cxx_expand_expr): Removed.
3872 * cp-tree.h (exx_expand_expr): Removed.
3873 * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
3876 2007-10-25 Paolo Carlini <pcarlini@suse.de>
3879 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
3881 2007-10-23 Jason Merrill <jason@redhat.com>
3883 PR c++/25950 (DR 391)
3884 * call.c (struct conversion): Remove check_copy_constructor_p.
3885 (reference_binding): Always bind a reference directly to a
3886 compatible class rvalue. Pass down LOOKUP_NO_TEMP_BIND during
3888 (check_constructor_callable): Remove.
3889 (convert_like_real): Don't call it.
3890 (initialize_reference): Don't call check_constructor_callable.
3891 (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
3892 LOOKUP_CONSTRUCTOR_CALLABLE. Don't require a temporary for base
3893 conversions if LOOKUP_NO_TEMP_BIND.
3894 (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
3895 (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
3897 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
3899 2007-10-22 Jakub Jelinek <jakub@redhat.com>
3902 * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
3903 before checking if its type is integral.
3905 2007-10-22 Jason Merrill <jason@redhat.com>
3908 * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
3909 * pt.c (apply_late_template_attributes): Splice out dependent
3910 attributes from DECL_ATTRIBUTES.
3912 * decl.c (cxx_maybe_build_cleanup): Use build_address.
3914 2007-10-17 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3916 * typeck.c (build_binary_op) : Use appropriate warning option
3917 instead of unnamed warning.
3919 2007-10-16 Paolo Carlini <pcarlini@suse.de>
3922 * pt.c (current_template_args): Do not change TREE_LIST elements
3923 with a TREE_VALUE of error_mark_node.
3925 2007-10-16 Mark Mitchell <mark@codesourcery.com>
3927 * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
3928 * decl.c (start_decl): Tidy.
3929 (start_decl_1): Call cp_apply_type_quals_to_decl after completing
3931 (grokdeclarator): Clarify comment.
3933 2007-10-14 Andrew Pinski <pinskia@gmail.com>
3936 * decl.c (grokfndecl): Return NULL after the "definition of
3937 implicitly-declared" error happened.
3939 2007-10-12 Simon Martin <simartin@users.sourceforge.net>
3942 * call.c (build_user_type_conversion_1): Do not consider conversion
3943 functions to convert a (possibly cv-qualified) object to the (possibly
3944 cv-qualified) same object type (or a reference to it), to a (possibly
3945 cv-qualified) base class of that type (or a reference to it).
3947 2007-10-12 Paolo Carlini <pcarlini@suse.de>
3949 * pt.c (tsubst): Use template_parm_level_and_index.
3951 2007-10-12 Jakub Jelinek <jakub@redhat.com>
3954 * parser.c (cp_parser_compound_statement): Handle label-declarations
3955 at the beginning of the compound statement.
3956 (cp_parser_block_declaration): Issue diagnostics about __label__
3957 not at the beginning of a block.
3959 2007-10-11 Paolo Carlini <pcarlini@suse.de>
3962 * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
3963 to convert_template_argument.
3964 (coerce_template_parms): Return error_mark_node after fixed-length
3966 (tsubst_decl): Check for error_mark_node the return value of the
3967 first tsubst in 'case VAR_DECL'.
3969 2007-10-08 Ollie Wild <aaw@google.com>
3971 * typeck2.c (digest_init): Call cplus_expand_constant after
3972 convert_for_initialization.
3973 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
3974 * expr.c (cplus_expand_constant): Updated function description.
3976 2007-10-04 Jason Merrill <jason@redhat.com>
3979 * call.c (initialize_reference): Handle local static reference
3982 2007-10-03 Jason Merrill <jason@redhat.com>
3985 * name-lookup.c (push_namespace_with_attrs): Fold back into...
3986 (push_namespace): Here.
3987 (handle_namespace_attrs): New fn for the attr code.
3988 (leave_scope): Don't pop_visibility.
3989 * name-lookup.h (struct cp_binding_level): Remove has_visibility.
3990 * parser.c (cp_parser_namespace_definition): Call
3991 handle_namespace_attrs and pop_visibility as appropriate.
3994 * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
3996 2007-10-03 Alexandre Oliva <aoliva@redhat.com>
3998 * decl.c (duplicate_decls): Preserve linkage flags for mere
3999 redeclarations of gnu_inline definitions.
4001 2007-10-03 Jason Merrill <jason@redhat.com>
4004 * decl.c (wrap_cleanups_r): New fn.
4005 (wrap_temporary_cleanups): New fn.
4006 (initialize_local_var): Call it.
4008 2007-09-29 Jason Merrill <jason@redhat.com>
4011 * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
4012 constant to not have DECL_EXTERNAL if it's file-local.
4014 2007-09-28 Ollie Wild <aaw@google.com>
4017 2007-09-27 Ollie Wild <aaw@google.com>
4019 * typeck2.c (digest_init): Call cplus_expand_constant after
4020 convert_for_initialization.
4021 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
4022 * expr.c (cplus_expand_constant): Updated function description.
4024 2007-09-28 Jason Merrill <jason@redhat.com>
4027 * class.c (layout_empty_base): Take rli parameter, update
4028 rli->record_align if empty base has user-specified alignment.
4029 (build_base_field): Pass rli to it.
4031 2007-09-28 Paolo Carlini <pcarlini@suse.de>
4034 * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
4036 2007-09-28 Paolo Carlini <pcarlini@suse.de>
4039 * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
4040 (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
4041 (dump_parameters): Just call dump_type for argument packs too.
4043 2007-09-28 Jakub Jelinek <jakub@redhat.com>
4046 * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
4047 qualification by creating qualified PACK_EXPANSION_PATTERN and
4048 then calling make_pack_expansion on it.
4050 2007-09-27 Ollie Wild <aaw@google.com>
4052 * typeck2.c (digest_init): Call cplus_expand_constant after
4053 convert_for_initialization.
4054 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
4055 * expr.c (cplus_expand_constant): Updated function description.
4057 2007-09-27 Jason Merrill <jason@redhat.com>
4060 * decl2.c (is_late_template_attribute): Don't crash on unknown
4063 2007-09-27 Paolo Carlini <pcarlini@suse.de>
4066 * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
4067 * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
4068 spaces in the formatting.
4069 * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
4071 2007-09-27 Jakub Jelinek <jakub@redhat.com>
4073 * error.c (cxx_print_error_function): Add third argument, pass
4074 it over to lhd_print_error_function.
4075 (cp_print_error_function): If diagnostic->abstract_origin, print
4077 * cp-tree.h (struct diagnostic_info): New forward decl.
4078 (cxx_print_error_function): Add third argument.
4080 2007-09-25 Simon Martin <simartin@users.sourceforge.net>
4083 * name-lookup.c (pushtag): Do not create an implicit typedef before
4084 the associated type declaration is known to be valid.
4086 2007-09-25 Jakub Jelinek <jakub@redhat.com>
4088 * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
4089 rather than pointers.
4091 2007-09-24 Danny Smith <dannysmith@user.sourceforge.net>
4094 * search.c (check_final_overrider): Fail if
4095 targetm.comp_type_attributes returns 0.
4097 2007-09-24 Jason Merrill <jason@redhat.com>
4100 * pt.c (resolve_typename_type): Don't look things up in the original
4101 template if it would mean losing template arguments.
4103 2007-09-24 Jakub Jelinek <jakub@redhat.com>
4106 * cp-tree.h (cxx_type_hash_eq): New prototype.
4107 * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
4108 * tree.c (cxx_type_hash_eq): New function.
4110 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
4113 * tree.c (cp_build_qualified_type_real): Build a canonical
4114 ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
4116 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
4120 * tree.c (cplus_array_compare): Compare pointers, not types.
4121 (build_cplus_array_type_1): Store new array type into the hash
4122 table before building the canonical type; build the canonical type
4124 (cp_build_qualified_type_real): Put all of the array types with
4125 cv-qualified element types into the C++ array hash table, built as
4126 variants of the unqualified versions.
4128 2007-09-23 Jason Merrill <jason@redhat.com>
4131 * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
4132 for deprecation warnings.
4134 2007-09-22 Jason Merrill <jason@redhat.com>
4137 * call.c (build_over_call): Warn about deprecated virtuals.
4140 * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
4141 (MAYBE_TAGGED_TYPE_P): Remove.
4142 * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
4143 instead of calling is_late_template_attribute again.
4144 (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
4145 (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
4146 Don't crash on typedefs from non-template classes.
4147 * decl2.c (grokfield): Don't sorry about attrs on template parms.
4148 (is_late_template_attribute): All attributes applied to template
4149 parms or typename types are dependent. Static.
4150 (splice_template_attributes): Pass decl through.
4151 (save_template_attributes): Likewise.
4153 2007-09-20 Jakub Jelinek <jakub@redhat.com>
4156 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
4157 returned from tsubst_pack_expansion.
4158 (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
4159 (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
4161 2007-09-20 Paolo Carlini <pcarlini@suse.de>
4164 * semantics.c (finish_id_expression): Use consistently
4165 context_for_name_lookup.
4166 * decl.c (fixup_anonymous_aggr): Fix error message for
4167 anonymous struct (vs union).
4169 2007-09-19 Jason Merrill <jason@redhat.com>
4172 * pt.c (tsubst): Handle typedefs by looking for the specialization.
4173 (retrieve_specialization): Only tagged types use
4174 DECL_TEMPLATE_INSTANTIATIONS.
4175 (instantiate_class_template): Push nested classes too.
4176 (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
4178 * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
4179 * init.c (is_aggr_type): Remove redundant tests.
4180 * class.c (push_nested_class): Use CLASS_TYPE_P.
4182 2007-09-20 Paolo Carlini <pcarlini@suse.de>
4185 * init.c (build_zero_init): If, recursively, build_zero_init
4186 returns a NULL_TREE, do not append it to the VEC of constructors.
4188 2007-09-18 Jason Merrill <jason@redhat.com>
4191 * pt.c (apply_late_template_attributes): Set processing_template_decl.
4192 (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
4193 ATTR_FLAG_TYPE_IN_PLACE.
4194 (tsubst): Do unqualified lookup to find typedefs from current class.
4195 [ARRAY_TYPE]: Propagate alignment info.
4196 * decl2.c (is_late_template_attribute): Only defer handling of
4197 attribute aligned if the expression is dependent.
4198 (save_template_attributes): If we're deferring any attributes,
4199 make this a naming typedef.
4201 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4203 PR c++/33462 (again)
4204 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
4205 va_arg instead of __builtin_va_arg.
4207 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4210 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
4211 (pp_cxx_primary_expression): Use it.
4212 * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
4213 * error.c (dump_expr): Use it.
4215 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4218 * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
4219 out case TYPEID_EXPR to...
4220 (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
4221 and pp_cxx_right_paren.
4222 * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
4223 * error.c (dump_expr): Use it.
4225 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4228 * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
4229 (pp_cxx_primary_expression): Use it.
4230 * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
4231 * error.c (dump_expr): Use it.
4233 2007-09-16 Paolo Carlini <pcarlini@suse.de>
4236 * init.c (build_new): Remove warning for zero-element
4239 2007-09-16 Nathan Sidwell <nathan@codesourcery.com>
4242 * call.c (maybe_handle_implicit_object): Set this_p, clear
4243 rvaluedness_matches_p.
4244 (compare_ics): Do not compare rvaluedness matching when one of the
4245 operands is an implicit object.
4247 2007-09-14 Jason Merrill <jason@redhat.com>
4249 PR c++/17743, c++/19163
4250 * decl2.c (is_late_template_attribute): New fn.
4251 (splice_template_attributes, save_template_attributes): New fns.
4252 (cplus_decl_attributes): Call save_template_attributes.
4253 * pt.c (apply_late_template_attributes): New fn.
4254 (instantiate_class_template, tsubst_decl): Use it.
4255 * cp-tree.h: Declare is_late_template_attribute.
4257 2007-09-13 Tom Tromey <tromey@redhat.com>
4259 * parser.c (cp_lexer_new_main): Don't use
4260 c_lex_return_raw_strings.
4261 (cp_lexer_get_preprocessor_token): Update. Add special case when
4264 2007-09-11 Jan Hubicka <jh@suse.cz>
4266 * method.c (use_thunk): Use tree_rest_of_compilation
4267 * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
4268 (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
4269 * cp-tree.h (expand_body): Kill.
4270 (emit_associated_thunks): Declare.
4271 * semantics.c (emit_associated_thunks): Export.
4272 (expand_body): Kill.
4274 2007-09-09 David Daney <ddaney@avtrex.com>
4277 * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
4278 to calculate cookie_ptr.
4280 2007-09-08 Jason Merrill <jason@redhat.com>
4283 * pt.c (most_specialized_class): Set processing_template_decl
4284 while tsubsting partial spec args.
4286 2007-09-06 Jason Merrill <jason@redhat.com>
4288 * decl2.c (get_guard): Copy visibility from the guarded variable.
4290 2007-09-06 Jan Hubicka <jh@suse.cz>
4292 * semantics.c (expand_body): Do not mark arguments of clones used.
4294 2007-09-06 Paolo Carlini <pcarlini@suse.de>
4297 * decl.c (cp_finish_decl): When processing_template_decl,
4298 deal correctly with init as TREE_LIST.
4300 2007-09-06 Tom Tromey <tromey@redhat.com>
4302 * decl.c (finish_function): Put return's location on line zero of
4305 2007-09-05 Jason Merrill <jason@redhat.com>
4308 * except.c (prepare_eh_type): Use type_decays_to.
4311 * init.c (build_delete): Use build_headof to get the address of the
4312 complete object if we aren't using the deleting destructor.
4313 * rtti.c (build_headof): No longer static.
4314 * cp-tree.h: Declare it.
4316 2007-09-06 Jakub Jelinek <jakub@redhat.com>
4318 * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
4319 decl if a prototype for XX is provided with throw().
4322 * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
4323 on __*_chk non-__builtin_* decls.
4325 2007-09-05 Paolo Carlini <pcarlini@suse.de>
4328 * semantics.c (finish_id_expression): Use context_for_name_lookup
4329 insted of DECL_CONTEXT, to see through anonymous structs and unions.
4330 * class.c (finish_struct_anon): Deal correctly with anonymous
4331 structs (vs unions, as GNU extension) in error messages.
4333 2007-09-05 Jan Hubicka <jh@suse.cz>
4335 * sematics.c (expand_body): Remove unnecesary import_export_decl
4336 call, DECL_EXTERNAL checks and current_function_decl saving.
4338 2007-09-05 Paolo Carlini <pcarlini@suse.de>
4340 PR c++/29731 (again)
4341 * parser.c (cp_parser_primary_expression): Return error_mark_node
4342 when a statement-expression is found in a template-argument list.
4344 2007-09-04 Jason Merrill <jason@redhat.com>
4346 * except.c (initialize_handler_parm): Use
4347 fold_build_cleanup_point_expr.
4350 * call.c (reference_binding): Don't look for user-defined conversions
4354 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
4355 the MUST_NOT_THROW_EXPR.
4357 2007-09-04 Richard Sandiford <richard@codesourcery.com>
4359 * decl.c (cp_finish_decl): Call determine_visibility before
4360 make_rtl_for_nonlocal_decl.
4362 2007-09-04 Jason Merrill <jason@redhat.com>
4365 * pt.c (most_specialized_class): Substitute outer template
4366 arguments into the arguments of a member template partial
4368 (strip_innermost_template_args): New fn.
4370 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
4372 * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
4374 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4376 * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
4377 * decl.c (cp_make_fname_decl): Likewise,
4378 * parser.c (cp_parser_string_literal): Likewise,
4379 * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
4380 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
4383 2007-09-02 Paolo Carlini <pcarlini@suse.de>
4386 * typeck.c (build_unary_op): Fix error message for
4387 Boolean expression as operand to operator--.
4389 2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4391 * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
4392 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
4395 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
4398 * init.c (build_default_init): Make extern.
4399 * cp-tree.h (build_default_init): Declare here.
4400 * pt.c (tsubst_expr): When the instantiation of the initializer of
4401 a variable results in an empty list, default-initialize the
4403 (tsubst_copy_and_build): When the instantiation of the initializer
4404 in a new expression results in an empty initializer list,
4405 default-initialize it.
4407 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
4409 * mangle.c (write_type): Change mangling of rvalue reference from
4412 2007-08-31 Jakub Jelinek <jakub@redhat.com>
4414 * decl.c (duplicate_decls): Remove duplicated line.
4416 2007-08-31 Paolo Carlini <pcarlini@suse.de>
4419 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
4420 BOUND_TEMPLATE_TEMPLATE_PARM.
4422 2007-08-31 Paolo Carlini <pcarlini@suse.de>
4425 * search.c (lookup_member): Check the name argument for
4428 2007-08-31 Paolo Carlini <pcarlini@suse.de>
4431 * parser.c (cp_parser_trait_expr): Check rerurn value of
4434 2007-08-30 Ollie Wild <aaw@google.com>
4436 * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
4437 convert_ptrmem for pointer to member conversions.
4438 (convert_to_pointer_force): Update cp_convert_to_pointer call.
4439 (ocp_convert): Update cp_convert_to_pointer call.
4440 * typeck.c (convert_ptrmem): Add conditional for null pointers to
4442 (build_static_cast_1): Check can_convert for conversions in either
4444 (get_delta_difference_1): New function.
4445 (get_delta_difference): Refactor to call get_delta_difference_1.
4447 2007-08-30 Jakub Jelinek <jakub@redhat.com>
4449 * decl.c (start_preparsed_function): Set
4450 DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
4452 2007-08-28 Paolo Carlini <pcarlini@suse.de>
4455 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
4456 BOUND_TEMPLATE_TEMPLATE_PARM.
4458 2007-08-28 Jakub Jelinek <jakub@redhat.com>
4462 * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
4463 and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
4465 2007-08-27 Jason Merrill <jason@redhat.com>
4468 * pt.c (build_non_dependent_expr, type_dependent_expression_p):
4469 Look inside STMT_EXPR.
4470 * semantics.c (stmt_expr_value_expr): New fn.
4471 * cp-tree.h: Declare it.
4474 * decl.c (groktypename): Ignore attributes applied to class type.
4476 2007-08-28 Richard Guenther <rguenther@suse.de>
4478 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
4480 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
4482 * error.c (dump_expr): Handle COMPLEX_CST.
4483 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
4484 (pp_cxx_expression): Likewise.
4486 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
4488 * decl.c (GNU_INLINE_P): New.
4489 (duplicate_decls): Handle gnu_inline. Merge attributes and
4490 some flags in overriding definitions.
4491 (redeclaration_error_message): Handle gnu_inline.
4492 (start_preparsed_function): Likewise.
4494 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4496 * call.c (sufficient_parms_p): Constify.
4497 * class.c (same_signature_p): Likewise.
4498 * cp-gimplify.c (is_invisiref_parm,
4499 cxx_omp_privatize_by_reference): Likewise.
4500 * cp-objcp-common.c (has_c_linkage): Likewise.
4501 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
4502 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
4503 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
4504 num_artificial_parms_for, comp_template_parms,
4505 template_parameter_pack_p, any_dependent_template_arguments_p,
4506 any_type_dependent_arguments_p, any_value_dependent_elements_p,
4507 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
4508 zero_init_p, member_p, cp_lvalue_kind,
4509 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
4510 varargs_function_p, is_dummy_object, special_function_kind,
4511 string_conv_p, type_unknown_p, comp_except_specs, compparms,
4512 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
4513 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
4514 cp_has_mutable_p, at_least_as_qualified_p,
4515 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
4516 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
4517 * except.c (nothrow_libfn_p): Likewise.
4518 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
4520 * pt.c (comp_template_parms, template_parameter_pack_p,
4521 any_type_dependent_arguments_p, any_value_dependent_elements_p,
4522 any_dependent_template_arguments_p): Likewise.
4523 * repo.c (repo_export_class_p): Likewise.
4524 * semantics.c (anon_aggr_type_p): Likewise.
4525 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
4526 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
4527 varargs_function_p, member_p, is_dummy_object, pod_type_p,
4528 zero_init_p, special_function_p): Likewise.
4529 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
4530 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
4531 compparms, invalid_nonstatic_memfn_p,
4532 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
4533 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
4534 cp_has_mutable_p, lvalue_or_else): Likewise.
4536 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
4538 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
4539 * cp-objcp-common.c (cp_tree_size): Ditto.
4540 * tree.c (cp_walk_subtrees): Ditto
4541 * cp-tree.def (TINST_LEVEL): Go away.
4542 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
4543 move together with other non-tree structs.
4544 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
4545 (union lang_tree_node): Eliminate tinst_level field.
4546 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
4547 (current_instantiation, outermost_tinst_level): Return
4548 a "struct tinst_level *".
4550 * error.c (print_instantiation_partial_context): Change second
4551 parameter to a "struct tinst_level *". Replace accessor macros
4553 (print_instantiation_full_context): Likewise.
4554 * lex.c (in_main_input_context): Likewise.
4556 * pt.c (struct pending_templates): New.
4557 (pending_templates, last_pending_template): Use it as a type.
4558 (current_tinst_level): Change typo to "struct tinst_level *"
4559 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
4560 (add_pending_template): Construct a "struct pending_template".
4561 Replace TINST_LEVEL accessor macros with field access.
4562 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
4563 (pop_tinst_level): Likewise.
4564 (instantiate_pending_templates): Likewise. Factor common code used
4565 when an instantiation has been done.
4566 (outermost_tinst_level): Replace tree_last with loop.
4567 (current_instantiation): Return a "struct tinst_level *".
4569 2007-08-24 Ollie Wild <aaw@google.com>
4571 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
4572 * name-lookup.h (cp_binding_level): Remove vtables member.
4574 2007-08-24 Richard Guenther <rguenther@suse.de>
4576 * tree.c (cp_cannot_inline_tree_fn): Remove.
4577 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
4578 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
4581 2007-08-24 Jakub Jelinek <jakub@redhat.com>
4584 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
4585 error_mark_node right away if build_expr_type_conversion
4589 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
4590 is error_mark_node rather than NULL_TREE.
4591 * pt.c (check_explicit_specialization): Likewise.
4594 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
4595 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
4597 2007-08-22 Jason Merrill <jason@redhat.com>
4600 * pt.c (outermost_tinst_level): New function.
4601 * lex.c (in_main_input_context): New function.
4602 * cp-tree.h: Declare it.
4603 * decl2.c (constrain_class_visibility): Use it to avoid warning
4604 about uses of the anonymous namespace in the main input file.
4606 2007-08-21 Jakub Jelinek <jakub@redhat.com>
4608 * init.c (build_new_1): Use get_target_expr instead of save_expr.
4610 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
4613 * class.c (finish_struct_1): Warn when a class has virtual
4614 functions and accessible non-virtual destructor.
4616 2007-08-20 Richard Guenther <rguenther@suse.de>
4620 * call.c (build_new_method_call): Convert initializer to
4622 * init.c (build_aggr_init): Do not fiddle with types.
4623 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
4624 * except.c (build_throw): Do not drop qualifiers for the
4626 * typeck.c (get_member_function_from_ptrfunc): Do not
4627 fiddle with types, instead convert.
4628 (build_ptrmemfunc1): Convert to the target type for
4630 (gfc_trans_allocate): Convert result to target type.
4631 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
4632 pointer-to-member structures shall have alias set zero as well.
4634 2007-08-20 Richard Guenther <rguenther@suse.de>
4636 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
4638 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
4639 (nonstatic_local_decl_p): Likewise.
4640 * tree.c (cp_auto_var_in_fn_p): Remove.
4641 * decl.c (nonstatic_local_decl_p): Remove.
4643 2007-08-20 Richard Guenther <rguenther@suse.de>
4645 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
4647 * tree.h (cp_walk_tree): New define to walk_tree_1 with
4648 cp_walk_subtrees lh parameter.
4649 (cp_walk_tree_without_duplicates): New define to
4650 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
4651 * tree.c (count_trees): Call
4652 cp_walk_tree_without_duplicates.
4653 (verify_stmt_tree): Call cp_walk_tree.
4654 (break_out_target_exprs): Likewise.
4655 (WALK_SUBTREE): Likewise.
4656 * cp-gimplify.c (cp_genericize): Likewise.
4657 * cp-pt.c (find_parameter_packs_r): Likewise.
4658 (uses_parameter_packs): Likewise.
4659 (make_pack_expansion): Likewise.
4660 (check_for_bare_parameter_packs): Likewise.
4661 (for_each_template_parm): Likewise.
4662 * decl.c (check_default_argument): Call
4663 cp_walk_tree_without_duplicates.
4664 * except.c (build_throw): Likewise.
4665 * decl2.c (type_visibility): Likewise.
4666 * semantics.c (expand_or_defer_fn): Likewise.
4667 (finalize_nrv): Call cp_walk_tree.
4669 2007-08-20 Jakub Jelinek <jakub@redhat.com>
4672 * init.c (build_new_1): Rename placement_var variable to placement_expr.
4673 Initialize it with save_expr rather than get_temp_regvar.
4675 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
4678 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
4681 2007-08-17 Ollie Wild <aaw@google.com>
4684 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
4685 declarations into appropriate slots for comparison. Fix type
4688 2007-08-17 Paolo Carlini <pcarlini@suse.de>
4691 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
4692 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
4694 2007-08-17 Paolo Carlini <pcarlini@suse.de>
4697 * parser.c (cp_parser_class_head): Improve error message.
4699 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
4701 * pt.c (instantiate_decl): Set input_location
4702 for the function end.
4704 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4706 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
4708 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
4709 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
4710 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
4711 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
4712 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
4713 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
4714 * typeck.c (cp_type_quals): Likewise.
4715 * typeck2.c (cxx_incomplete_type_diagnostic,
4716 cxx_incomplete_type_error): Likewise.
4718 2007-08-16 Paolo Carlini <pcarlini@suse.de>
4721 * pt.c (tsubst_friend_function): When check_classfn
4722 returns error_mark_node likewise return it.
4724 2007-08-15 Jakub Jelinek <jakub@redhat.com>
4727 * typeck.c (check_return_expr): Don't NRV optimize vars in
4729 * decl.c (finish_function): Comment fix.
4731 2007-08-15 Paolo Carlini <pcarlini@suse.de>
4734 * pt.c (push_template_decl_real): Depending on TYPE_P
4735 use either TYPE_CONTEXT or DECL_CONTEXT.
4737 2007-08-14 Mark Mitchell <mark@codesourcery.com>
4739 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
4740 constructors and destructors return this.
4742 2007-08-14 Paolo Carlini <pcarlini@suse.de>
4745 * decl2.c (check_classfn): Return error_mark_node in case of error;
4746 in that case, do not call add_method.
4747 * decl.c (start_decl): Deal with check_classfn returning
4749 (grokfndecl): Likewise.
4750 * pt.c (tsubst_friend_function): Likewise.
4752 2007-08-14 Andrew Pinski <pinskia@gmail.com>
4755 * typeck.c (build_binary_op): Disallow vector float types with
4756 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
4758 2007-08-11 Ian Lance Taylor <iant@google.com>
4760 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
4762 * cp-tree.h (cxx_get_alias_set): Update declaration.
4764 2007-08-10 Ollie Wild <aaw@google.com>
4766 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
4768 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
4770 (unqualified_namespace_lookup): Fix ambiguous_decl call.
4771 (lookup_using_namespace): Fix ambiguous_decl call.
4772 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
4774 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4776 * call.c (name_as_c_string): Use CONST_CAST.
4777 * decl.c (build_decl): Likewise.
4778 * parser.c (cp_parser_string_literal): Likewise.
4780 2007-08-10 Paolo Carlini <pcarlini@suse.de>
4783 * error.c (dump_expr): Consistently use the *_cxx_*
4784 variants of the pretty-print functions.
4786 2007-08-10 Paolo Carlini <pcarlini@suse.de>
4789 * decl.c (check_special_function_return_type): Just error
4790 on return type specified for conversion operator.
4792 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
4794 * typeck2.c (readonly_error): Handle general expressions.
4795 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
4797 2007-08-06 Dan Hipschman <dsh@google.com>
4799 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
4800 access function name.
4802 2007-08-04 Alfred Minarik <a.minarik@aon.at>
4805 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
4806 * g++spec.c (lang_specific_driver): Check them.
4808 2007-08-06 Paolo Carlini <pcarlini@suse.de>
4811 * pt.c (inline_needs_template_parms): Fix comment; change return type
4814 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
4817 2007-03-26 Dirk Mueller <dmueller@suse.de>
4819 * parser.c (cp_parser_member_declaration): Pedwarn
4820 about stray semicolons after member declarations.
4822 2007-08-02 Lee Millward <lee.millward@gmail.com>
4827 * parser.c (cp_parser_asm_definition): Detect and discard asm
4828 statements with invalid inputs or outputs.
4829 (cp_parser_asm_operand_list): Return error mark node if any
4830 of the operands are invalid. Adjust documentation.
4832 2007-08-02 Nick Clifton <nickc@redhat.com>
4834 * typeck.c: Change copyright header to refer to version 3 of the
4835 GNU General Public License and to point readers at the COPYING3
4836 file and the FSF's license web page.
4837 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
4838 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
4839 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
4840 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
4841 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
4842 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
4843 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
4844 name-lookup.h, parser.c: Likewise.
4846 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4849 * call.c (magic_varargs_p): Honor the "type generic" attribute.
4851 2007-07-30 Paolo Carlini <pcarlini@suse.de>
4854 * semantics.c (finish_label_stmt): Reject the __label__
4855 extension outside function scopes.
4857 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4859 * parser.c (eof_token): Un-constify.
4860 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
4861 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
4864 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
4866 * pt.c, tree.c, typeck2.c: Fix comment typos.
4868 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
4869 Mark Mitchell <mark@codesourcery.com>
4872 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
4873 hidden due to friend declarations in local classes.
4875 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
4877 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
4878 * cp-tree.def (DECLTYPE_TYPE): New.
4879 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
4880 (dump_type_prefix): Ditto.
4881 (dump_type_suffix): Ditto.
4882 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
4883 * mangle.c (write_type): Handle DECLTYPE_TYPE.
4884 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
4886 (DECLTYPE_TYPE_EXPR): New.
4887 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
4888 (finish_declared_type): Declare.
4889 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
4890 DECLTYPE_TYPE nodes.
4891 (pp_cxx_type_id): Ditto.
4892 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
4893 (tsubst): Substitute into a DECLTYPE_TYPE node.
4894 (tsubst_copy): Ditto.
4895 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
4897 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
4898 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
4899 structural equality (because we can't hash the expressions).
4900 (finish_declared_type): New.
4901 * lex.c (reswords): Add "decltype" keyword.
4902 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
4903 (cp_parser_postfix_expression): Add member_access_only_p to
4904 restrict postfix expression to member access expressions.
4905 (cp_parser_unary_expression): Update call to
4906 cp_parser_postfix_expression to reflect new parameter.
4907 (cp_parser_declared_type): New.
4908 (cp_parser_simple_type_specifier): Parse decltype types.
4910 2007-07-27 Mark Mitchell <mark@codesourcery.com>
4913 * call.c (convert_for_arg_passing): Only widen bitfields to their
4914 declared types if necessary.
4916 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4918 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
4921 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4923 * decl.c (typename_hash, typename_compare): Constify.
4924 * mangle.c (hash_type, compare_type): Likewise.
4925 * pt.c (eq_local_specializations, hash_local_specialization):
4927 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
4928 list_hash): Likewise.
4929 * typeck2.c (pat_compare): Likewise.
4931 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
4933 * method.c (implicitly_declare_fn): Increase alignment if member
4934 function pointer format requires it.
4936 2007-07-24 Paolo Carlini <pcarlini@suse.de>
4939 * typeck.c (check_return_expr): Do not pass a null argument
4942 2007-07-24 Paolo Carlini <pcarlini@suse.de>
4945 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
4948 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
4951 * typeck.c (convert_arguments): Only use default args if we have
4955 * typeck.c (structural_comptypes): No need to check
4956 resolve_typename_type return value here.
4957 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
4958 * pt.c (resolve_typename_type): Follow typename typedefs. Return
4959 original type rather than error_mark_node in case of failure.
4960 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
4961 resolve_typename_type result check.
4962 (cp_parser_direct_declarator, cp_parser_head,
4963 cp_parser_constructor_declarator_p): Likewise.
4965 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
4967 * pt.c (template_parms_variadic_p): Remove.
4968 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
4970 2007-07-12 Jakub Jelinek <jakub@redhat.com>
4973 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
4974 argument to dump_aggr_init_expr_args instead of false.
4976 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
4978 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
4979 canonical types; otherwise, fall back to structural type
4980 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
4981 internal compiler error if the canonical types are wrong.
4983 2007-07-11 Paolo Carlini <pcarlini@suse.de>
4986 * parser.c (cp_parser_make_indirect_declarator): When the
4987 the code argument is ERROR_MARK return cp_error_declarator.
4989 2007-07-09 Geoffrey Keating <geoffk@apple.com>
4992 * decl.c (cxx_init_decl_processing): Don't set
4993 force_align_functions_log.
4994 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
4995 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
4996 FUNCTION_DECL, return its alignment.
4998 2007-07-09 Richard Guenther <rguenther@suse.de>
5000 * decl.c (start_preparsed_function): Do not promote return type.
5002 2007-07-08 Paolo Carlini <pcarlini@suse.de>
5005 * pt.c (unify): Never pass error_mark_node to template_decl_level.
5007 2007-07-07 Mark Mitchell <mark@codesourcery.com>
5010 * pt.c (resolve_overloaded_unification): Robustify. Return a
5012 (type_unification_real): Adjust accordingly.
5014 2007-07-06 Richard Guenther <rguenther@suse.de>
5016 * init.c (build_new_1): Use the correct pointer type.
5017 * typeck2.c (build_m_component_ref): Likewise.
5019 2007-07-05 Mark Mitchell <mark@codesourcery.com>
5022 * init.c (build_zero_init): Always build an initializer for
5024 * typeck2.c (build_functional_cast): Use build_zero_init.
5027 * init.c (build_new_1): Always pass the allocation function to
5028 build_op_delete_call.
5029 * call.c (build_op_delete_call): Handle operator delete with a
5030 variable-argument list. Do not issue an error when no matching
5031 deallocation function is available for a new operator.
5034 * cp-tree.h (any_value_dependent_elements_p): Declare it.
5035 * decl.c (value_dependent_init_p): New function.
5036 (cp_finish_decl): Use it.
5037 * pt.c (value_dependent_expression_p): Use
5038 any_value_dependent_elements_p.
5039 * parser.c (cp_parser_primary_expression): Add comment about
5040 treating dependent qualified names as integral
5041 constant-expressions.
5043 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
5045 * decl.c (build_ptrmemfunc_type): Always use structural equality
5046 tests when comparing pointer-to-member-function types, because the
5047 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
5050 2007-07-03 Mark Mitchell <mark@codesourcery.com>
5052 * init.c (build_new): Tweak comment.
5054 2007-06-29 Dave Brolley <brolley@redhat.com>
5057 * parser.c (cp_parser_new_type_id): Don't reduce a named array
5058 type to its base type and number of elements here.
5059 * init.c (build_new): Call complete_type_or_else to ensure that the
5060 type is complete and to issue a diagnostic if it is not.
5061 (build_new_1): Don't call complete_type_or_else here.
5063 2007-07-03 Richard Guenther <rguenther@suse.de>
5066 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
5069 2007-07-02 Simon Baldwin <simonb@google.com>
5071 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
5072 for inner-style nested forward declarations that don't declare
5075 2007-07-02 Jakub Jelinek <jakub@redhat.com>
5078 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
5079 DECL_P in not a variable and appears more than once error messages.
5081 2007-07-01 Ollie Wild <aaw@google.com>
5083 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
5084 (select_decl): Remove function.
5085 (unqualified_namespace_lookup): Populate binding by calling
5086 ambiguous_decl. Remove select_decl call.
5087 (lookup_qualified_name): Remove select_decl call.
5088 * decl.c (lookup_and_check_tag): Check for ambiguous references.
5089 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
5090 generation when name lookup is ambiguous.
5092 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
5095 * init.c (build_new_1): Use structural equality on the copy of the
5098 2007-06-28 Geoffrey Keating <geoffk@apple.com>
5100 * decl2.c (determine_visibility): Implement
5101 flag_visibility_ms_compat effect on type info.
5102 * decl.c (cxx_init_decl_processing): Implement
5103 global effect of flag_visibility_ms_compat.
5105 2007-06-28 Geoffrey Keating <geoffk@apple.com>
5107 * decl2.c (start_objects): Mark constructor-running function
5110 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
5113 * decl.c (grokdeclarator): Reset friendp for member functions declared
5114 friend of their own class.
5116 2007-06-23 Mark Mitchell <mark@codesourcery.com>
5118 * decl2.c (determine_visibility): Don't look for dllexport here.
5119 (determine_visibility_from_class): Tidy.
5121 2007-06-18 Simon Baldwin <simonb@google.com>
5124 * parser.c (cp_parser_single_declaration): Added check for storage
5125 class other than sc_none in parsed declaration, and a flag to indicate
5126 if the call is part of an explicit template specialization parse.
5127 * (cp_parser_explicit_specialization): Specialization check flag added
5128 to call to cp_parser_single_declaration(), set true.
5129 * (cp_parser_template_declaration_after_export): Specialization check
5130 flag added to call to cp_parser_single_declaration(), set false.
5131 * pt.c (check_explicit_specialization): Added code to copy visiblity
5132 and linkage from the templated function to the explicit specialization.
5134 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
5136 * typeck.c (build_binary_op): For templates build the
5137 expression in pieces to avoid the assert in build2_stat.
5138 (get_member_function_from_ptrfunc):
5139 Change over to using POINTER_PLUS_EXPR and convert
5140 the second operand to sizetype.
5141 * typeck2.c (build_m_component_ref): Likewise.
5142 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
5143 instead of PLUS_EXPR for pointers.
5144 (build_new_1): Likewise.
5145 (build_vec_delete_1): Likewise.
5146 (build_vec_delete): Likewise.
5147 * class.c (build_base_path): Likewise.
5148 (build_base_path): Likewise.
5149 (convert_to_base_statically): Likewise.
5150 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
5151 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
5152 instead of PLUS_EXPR.
5153 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
5154 instead of PLUS_EXPR for pointers.
5155 * call.c (build_special_member_call): Likewise.
5156 * rtti.c (build_headof): Likewise.
5157 Use sizetype instead of ptrdiff_type_node.
5158 (tinfo_base_init): Create a POINTER_PLUS_EXPR
5159 instead of PLUS_EXPR for pointers.
5160 * except.c (expand_start_catch_block): Do a
5161 NEGATIVE and then a POINTER_PLUS_EXPR instead
5163 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
5164 PLUS_EXPR on pointer types over to use
5165 POINTER_PLUS_EXPR and remove the conversion
5166 to the pointer types.
5167 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
5168 adding to a pointer type. Use size_int instead of
5169 ssize_int. Convert the index to sizetype before
5170 adding it to the pointer.
5172 2007-06-15 Mark Mitchell <mark@codesourcery.com>
5174 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
5175 (DECL_ANON_UNION_VAR_P): New macro.
5176 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
5177 than DECL_VAR_MARKED_P, to keep track of which variables we have
5179 * decl.c (redeclaration_error_message): Complain about redeclaring
5180 anonymous union members at namespace scope.
5181 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
5183 2007-06-14 Geoff Keating <geoffk@apple.com>
5185 * decl2.c (determine_visibility): Ensure that functions with
5186 hidden types as parameters are hidden.
5189 * decl2.c (determine_visibility): Remove duplicate code for
5192 2007-06-12 Ian Lance Taylor <iant@google.com>
5195 * init.c (avoid_placement_new_aliasing): New static function.
5196 (build_new_1): Call it.
5198 2007-06-11 Rafael Ávila de Espíndola <espindola@google.com>
5200 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
5201 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
5203 2007-06-08 Jakub Jelinek <jakub@redhat.com>
5206 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
5207 on init, the non-decl cond operand and increment value.
5209 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
5212 * decl.c (check_initializer): Report an error when a brace enclosed
5213 initializer is used for a non-aggregate type in C++98.
5214 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
5216 (grokdeclarator): Likewise.
5217 (move_fn_p): Likewise.
5218 * typeck.c (check_return_expr): Likewise.
5219 * call.c (reference_binding): Likewise.
5220 * error.c (cp_cpp_error): Likewise.
5221 * pt.c (check_default_tmpl_args): Likewise.
5223 * lex.c (init_reswords): Likewise.
5224 * parser.c (p_parser_primary_expression): Likewise.
5225 (TOKEN_PRECEDENCE): Likewise.
5226 (cp_parser_init_declarator): Likewise.
5227 (cp_parser_ptr_operator): Likewise.
5228 (cp_parser_parameter_declaration): Likewise.
5229 (cp_parser_enclosed_template_argument_list): Likewise.
5230 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
5231 (cp_parser_next_token_ends_template_argument_p): Likewise.
5233 2007-06-04 Simon Baldwin <simonb@google.com>
5235 * decl.c (grokdeclarator): Readability change. Moved case labels
5236 into direct switch statement scope.
5238 2007-06-04 Paolo Carlini <pcarlini@suse.de>
5240 * call.c (convert_like_real): Remove pointless code.
5242 2007-05-31 Mark Mitchell <mark@codesourcery.com>
5244 * decl.c (get_atexit_fn_ptr_type): New function.
5245 (get_atexit_node): Use it.
5246 (start_cleanup_fn): Likewise.
5247 (register_dtor_fn): Use the object's destructor, instead of a
5248 separate cleanup function, where possible.
5249 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
5250 (atexit_fn_ptr_type_node): New macro.
5251 * decl2.c (build_cleanup): Use build_address.
5253 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
5255 * typeck.c (build_binary_op): Include types in error.
5257 2007-05-31 Jakub Jelinek <jakub@redhat.com>
5260 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
5261 needs runtime initialization.
5263 2007-05-31 Paolo Carlini <pcarlini@suse.de>
5266 * semantics.c (finish_trait_expr): Complete the types.
5268 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
5269 Douglas Gregor <doug.gregor@gmail.com>
5270 Pedro Lamarao <pedro.lamarao@mndfck.org>
5271 Howard Hinnant <howard.hinnant@gmail.com>
5275 * typeck.c (comptypes): Don't consider rvalue and lvalue
5276 reference types to be equivalent.
5277 (check_return_expr): Move from certain lvalues when returning
5279 * decl.c (grokdeclarator): Implement reference collapsing.
5280 (copy_fn_p): Don't consider constructors taking rvalue references
5281 to be copy constructors.
5283 * call.c (conversion): New "rvaluedness_matches_p" member.
5284 (convert_class_to_reference): Require reference type as first
5285 parameter instead of base type.
5286 (reference_binding): Add logic to handle rvalue references.
5287 (implicit_conversion): Update inaccurate comment.
5288 (convert_like_real): Disable creation of temporaries that are
5289 impossible to initialize for types with move constructors.
5290 (build_over_call): Elide move constructors when possible.
5291 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
5292 (maybe_handle_ref_bind): Return conversion instead of type node.
5293 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
5294 determine preferred conversion sequences.
5295 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
5296 (LOOKUP_PREFER_RVALUE): New.
5297 (DECL_MOVE_CONSTRUCTOR_P): New.
5298 (struct cp_declarator): Add "reference" member for reference
5299 types, with new "rvalue_ref" flag.
5300 (cp_build_reference_type): Declare.
5301 (move_fn_p): Declare.
5302 * error.c (dump_type_prefix): Format rvalue reference types
5303 correctly in error messages.
5304 * except.c (build_throw): Move from certain lvalues when
5306 * mangle.c (write_type): Mangle rvalue references differently
5307 than regular references.
5308 * parser.c (make_reference_declarator): Add boolean parameter for
5310 (cp_parser_make_indirect_declarator): New.
5311 (cp_parser_new_declarator_opt): Call
5312 cp_parser_make_indirect_declarator.
5313 (cp_parser_conversion_declarator_opt): Ditto.
5314 (cp_parser_declarator): Ditto.
5315 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
5317 * pt.c (tsubst): Implement reference collapsing.
5318 (maybe_adjust_types_for_deduction): Implement special template
5319 parameter deduction rule for rvalue references.
5320 (type_unification_real): Update calls to
5321 maybe_adjust_types_for_deduction.
5322 (try_one_overload): Ditto.
5323 (unify_pack_expansion): Ditto.
5324 * tree.c (lvalue_p_1): Handle rvalue reference types.
5325 (cp_build_reference_type): New.
5327 2007-05-30 Jakub Jelinek <jakub@redhat.com>
5330 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
5331 variables that need runtime initialization.
5333 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
5336 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
5337 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
5338 case POSTDECREMENT_EXPR>): Return the error_mark_node
5339 if either the real or imaginary parts would an
5342 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
5343 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5346 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
5347 token is a closing brace, false if there are no tokens left.
5348 (cp_parser_namespace_alias_definition): Only consume the next token if
5349 it is a closing brace.
5351 * parser.c (cp_parser_class_specifier): Likewise.
5353 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
5355 * semantics.c (finish_member_declaration): Fix a typo in the
5358 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
5370 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
5371 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
5372 * pt.c (check_for_bare_parameter_packs): Return bool indicated
5373 whether everything was okay. Fix indentation.
5374 (push_template_decl_real): Check for bare parameter packs in
5375 function parameters; where errors occur, mark the parameter types
5376 with ERROR_MARK_NODEs to avert ICEs.
5377 (coerce_template_parameter_pack): New.
5378 (coerce_template_parms): Moved parameter pack coercion into
5379 coerce_template_parameter_pack, and permit it anywhere in the
5380 template parameter list (not just at the end). Parameter and
5381 argument indices can vary (somewhat) separately now, so add
5382 PARM_IDX and ARG_IDX.
5383 (fn_type_unification): Don't set an argument pack as incomplete if
5384 no argument pack was deduced.
5385 (type_unification_real): If a type parameter is a parameter pack
5386 and has not otherwise been deduced, it will be deduced to an empty
5388 (more_specialized_fn): Use the actual lengths of the argument
5389 lists when comparing against expansions.
5390 * semantics.c (finish_member_declaration): If a field's type has
5391 bare parameter packs, error and set its type to ERROR_MARK_NODE.
5393 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
5396 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
5398 2007-05-22 Ollie Wild <aaw@google.com>
5400 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
5401 (unqualified_namespace_lookup): Adds check for hidden types.
5403 2007-05-22 Ollie Wild <aaw@google.com>
5405 * decl.c (duplicate_decls): Verify namespace names are unique.
5407 2007-05-21 Mark Mitchell <mark@codesourcery.com>
5409 * decl.c (cxx_maybe_build_cleanup): Handle
5410 __attribute__((cleanup)).
5412 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5414 * cvt.c (cp_convert_and_check): Don't check warnings if the
5417 2007-05-18 Geoffrey Keating <geoffk@apple.com>
5419 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
5421 2007-05-14 Paolo Carlini <pcarlini@suse.de>
5424 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
5425 type only if is a class type (5.2.8/4).
5427 2007-05-14 Rafael Ávila de Espíndola <espindola@google.com>
5429 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
5430 * decl.c (grokdeclarator): Use unsigned_type_for instead of
5431 c_common_unsigned_type.
5433 2007-05-11 Silvius Rus <rus@google.com>
5435 * typeck.c (build_indirect_ref): Add call to
5436 strict_aliasing_warning.
5437 (build_reinterpret_cast_1): Condition call to
5438 strict_aliasing_warning.
5440 2007-05-11 Jan Hubicka <jh@suse.cz>
5442 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
5443 * decl2.c (start_objects): ctors and dtors are no longer public.
5444 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
5446 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
5448 * typeck.c (build_unary_op): Remove code that used to
5449 handle non lvalue increments/decrements.
5451 2007-05-07 Mike Stump <mrs@apple.com>
5453 * parser.c (check_empty_body): Add.
5454 (cp_parser_iteration_statement): Add call to check_empty_body.
5456 2007-05-05 Geoffrey Keating <geoffk@apple.com>
5459 * mangle.c (write_mangled_name): Mangle static variable names.
5460 (write_unqualified_name): Use local-source-name for
5461 namespace-scope static variables.
5463 2007-05-04 Dirk Mueller <dmueller@suse.de>
5465 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
5468 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
5471 * decl2.c (constrain_class_visibility):
5472 Use strip_pointer_or_array_types instead of strip_array_types.
5474 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
5477 * decl.c (reshape_init_r): Don't reshape the first element if it
5478 is a pointer to member function.
5480 2007-04-27 Simon Baldwin <simonb@google.com>
5482 * decl.c (grokparms): Changed message format from %qD to %qE.
5484 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
5486 * error.c (maybe_warn_variadic_templates): Variadic templates are
5487 now in C++0x, so only warn about them in C++98 mode.
5489 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
5492 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
5493 integeral types from vectors types.
5495 2007-04-26 Jakub Jelinek <jakub@redhat.com>
5498 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
5499 for type dependent OMP_CLAUSE_DECLs.
5501 2007-04-24 Mark Mitchell <mark@codesourcery.com>
5504 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
5505 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
5506 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
5507 * init.c (build_zero_init): Adjust, as
5508 COMPLEX_TYPE is now a SCALAR_TYPE.
5509 * typeck2.c (digest_init): Allow brace-enclosed initializers for
5510 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
5512 2007-04-25 Paolo Carlini <pcarlini@suse.de>
5514 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
5515 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
5516 (trait_expr_value): Adjust.
5518 2007-04-23 Simon Baldwin <simonb@google.com>
5520 * decl.c (grokparms): Added new error for duplicate function
5521 parameters names in function prototypes, to match gcc behavior.
5523 2007-04-23 Jan Hubicka <jh@suse.cz>
5525 * decl2.c (finish_objects): Do not call target constructor/destructor
5528 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
5530 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
5531 instead of checking GIMPLE_STMT_P in chain_next.
5533 2007-04-17 Mark Mitchell <mark@codesourcery.com>
5536 * call.c (convert_for_arg_passing): Convert bitfields to their
5539 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
5542 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
5544 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
5547 * decl2.c (constrain_class_visibility):
5548 Do not warn about the use of anonymous namespace in the main input file.
5550 2007-04-15 Mark Mitchell <mark@codesourcery.com>
5552 * cp-tree.h (current_template_parms): Fix typo in comment.
5554 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
5556 * cp-tree.h, error.c: Fix comment typos.
5558 2007-04-13 Jason Merrill <jason@redhat.com>
5561 * call.c (reference_binding): Add c_cast_p parm. If true,
5562 add quals to TO as needed to make it reference-compatible.
5564 2007-04-11 Jan Hubicka <jh@suse.cz>
5566 * class.c (convert_to_base_statically): Fold produced tree; verify
5567 that we are not processing template_decl.
5569 2007-04-09 Mark Mitchell <mark@codesourcery.com>
5572 * class.c (build_base_path): Ensure that the converted pointer has
5573 the same cv-qualification as the input.
5575 2007-04-09 Paolo Carlini <pcarlini@suse.de>
5577 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
5579 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
5581 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
5583 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
5584 * tree.c (cp_add_pending_fn_decls): Remove.
5585 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
5587 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
5589 Revert change removing staticp.
5591 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
5593 * cp-objcp-common.c (cxx_staticp): Remove.
5594 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
5595 * cp-tree.h (cxx_staticp):
5597 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
5599 * class.c (check_for_override): Don't remove dllmport attribute
5602 2007-04-03 Jakub Jelinek <jakub@redhat.com>
5605 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
5606 type issue error and return early.
5608 2007-03-30 Jason Merrill <jason@redhat.com>
5611 * typeck.c (cp_type_readonly): New fn.
5612 * cp-tree.h: Declare it.
5613 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
5614 (cp_finish_decl): Not here.
5616 2007-03-31 Richard Guenther <rguenther@suse.de>
5618 * optimize.c (maybe_clone_body): Replace splay-tree usage by
5621 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
5626 * parser.c (declarator_can_be_parameter_pack): New.
5627 (cp_parser_template_parameter): Only parse the `...' if the
5628 declarator can be a parameter pack.
5629 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
5631 * pt.c (find_parameter_packs_r): Look into the bounds on integer
5632 types (they could be used as array bounds).
5633 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
5634 (tsubst_pack_expansion): Handle failure to expand parameter
5637 2007-03-30 Paolo Carlini <pcarlini@suse.de>
5640 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
5641 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
5642 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
5643 (CLASS_TYPE_NON_UNION_P): Add.
5644 (struct lang_type_class): Add has_complex_dflt.
5645 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
5646 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
5647 * cp-tree.def: Add TRAIT_EXPR.
5648 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
5649 * lex.c (struct resword): Add __has_nothrow_assign,
5650 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
5651 __has_trivial_constructor, __has_trivial_copy,
5652 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
5653 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
5654 __is_pod, __is_polymorphic, __is_union.
5655 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
5656 (cp_parser_trait_expr): New.
5657 * semantics.c (finish_trait_expr, trait_expr_value
5658 classtype_has_nothrow_copy_or_assign_p): New.
5659 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
5661 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
5662 * class.c (check_bases, check_field_decl, check_bases_and_members):
5663 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
5664 * pt.c (uses_template_parms, tsubst_copy_and_build,
5665 value_dependent_expression_p, type_dependent_expression_p): Deal with
5667 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
5669 2007-03-29 Richard Guenther <rguenther@suse.de>
5671 * tree.c (cp_walk_subtrees): Do not set input_location.
5673 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
5676 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
5679 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5681 * parser.c (struct cp_parser): Update comment for
5682 greater_than_is_operator_p.
5683 (cp_parser_primary_expression): In C++0x mode, a cast operator can
5684 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
5685 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
5686 !GREATER_THAN_IS_OPERATOR_P.
5687 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
5688 `>>' operators that will become two `>' tokens in C++0x.
5689 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
5690 mode, allowing it to terminate default arguments.
5691 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
5692 `>>' like two consecutive `>' tokens.
5693 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
5694 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
5695 ends a template argument.
5697 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5699 * decl.c (redeclaration_error_message): Complain when redeclaring
5700 a friend function with default template arguments (C++0x mode only).
5701 * cp-tree.h (check_default_tmpl_args): Declare.
5702 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
5703 template arguments in function templates. Add support for checking
5704 the default template arguments of friend templates.
5705 (push_template_decl_real): Fix call to check_default_tmpl_args.
5706 (type_unification_real): If a template parameter has not been
5707 deduced but provides a default template argument, substitute into
5708 that default template argument.
5709 * parser.c (cp_parser_init_declarator): When declaring (but not
5710 defining!) a function template in C++0x mode, check for default
5713 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5716 * decl.c (grokdeclarator): Deal with cv-qualified function type
5717 typedefs in the same way for member and non-member functions.
5719 2007-03-26 Dirk Mueller <dmueller@suse.de>
5721 * parser.c (cp_parser_member_declaration): Pedwarn
5722 about stray semicolons after member declarations.
5724 2007-03-26 Paolo Carlini <pcarlini@suse.de>
5727 * pt.c (instantiate_decl): Set in_system_header.
5729 2007-03-22 Mark Mitchell <mark@codesourcery.com>
5731 * cp-tree.h (current_tempalte_parms): Improve documentation.
5732 * pt.c (current_template_args): Likewise.
5735 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
5736 not consume tokens when failing.
5738 2007-03-22 Jim Wilson <wilson@specifix.com>
5739 Mark Mitchell <mark@codesourcery.com>
5742 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
5743 consistent with FROM.
5745 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5747 * error.c (dump_expr): Handle dependent names that designate types.
5748 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
5750 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
5752 * cp-tree.def, parser.c, pt.c: Fix comment typos.
5754 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5756 * cvt.c (cp_convert_and_check) : Define.
5757 * cp-tree.h (cp_convert_and_check): Declare.
5758 * call.c (convert_conversion_warnings): Rename to
5759 conversion_null_warnings. The warning for floating-point to
5760 integer is handled by convert_and_check in convert_like_real.
5761 (convert_like_real): convert_conversion_warnings was renamed as
5762 conversion_null_warnings.
5763 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
5764 overflow and changes of value during conversion.
5766 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5769 * parser.c (cp_parser_statement): If 'namespace' is found, this
5770 only can be a namespace alias definition, so parse it now.
5771 (cp_parser_namespace_alias_definition): if we find an open brace
5772 instead of '=', then this is actually a misplaced namespace
5775 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5778 * decl.c (cxx_init_decl_processing): Move command-line options
5779 processing to c-opts.c.
5781 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
5783 * ptree.c (cxx_print_type): Use formatting markup for integers
5784 when printing template parameter index/level/orig level.
5785 (cxx_print_xnode): Ditto.
5786 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
5787 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
5788 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
5790 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
5791 rather than a HOST_WIDE_INT.
5792 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
5793 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
5795 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
5796 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
5797 IN_BASE_INITIALIZER bool bitfields.
5798 (struct cp_declarator): Make KIND a 4-bit field. Make
5799 PARAMETER_PACK_P a bool bitfield just after KIND.
5800 * pt.c (uses_parameter_packs): Destroy the pointer set.
5801 (make_pack_expansion): Ditto.
5802 (check_for_bare_parameter_packs): Ditto.
5803 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
5805 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
5808 * call.c (convert_default_arg): Instead of copying the node,
5811 2007-03-15 Dirk Mueller <dmueller@suse.de>
5814 * call.c (convert_conversion_warnings): New..
5815 (convert_like_real): .. factored out from here.
5816 (convert_conversion_warnings): Add warning about
5817 false being converted to NULL in argument passing.
5819 2007-03-14 Dirk Mueller <dmueller@suse.de>
5821 * semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
5822 (finish_do_body): Warn about empty body in do/while statement.
5824 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5826 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
5828 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5831 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
5834 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
5836 * repo.c (init_repo): Initialize random_seed saved options.
5837 (finish_repo): Adjust.
5839 2007-03-13 Mark Mitchell <mark@codesourcery.com>
5842 * Make-lang.in (doc/g++.1): Use $< to specify the location from
5845 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
5847 * decl.c (compute_array_index_type): New warning flag warn_vla.
5849 2007-03-12 Mark Mitchell <mark@codesourcery.com>
5852 * call.c (convert_default_arg): Copy non-constant arguments.
5854 2007-03-11 Mark Mitchell <mark@codesourcery.com>
5857 * parser.c (cp_parser_postfix_expression): Disallow compound
5858 literals in constant expressions.
5861 * semantics.c (finish_typeof): Use unlowered_expr_type.
5863 2007-03-10 Mark Mitchell <mark@codesourcery.com>
5866 * cp-tree.h (unlowered_expr_type): New function.
5867 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
5868 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
5869 (unlowered_expr_type): New function.
5870 (build_unary_op): Disallow predecrements of bool bitfields.
5871 * call.c (build_conditional_expr): Use unlowered_expr_type.
5872 * pt.c (type_unification_real): Likewise.
5874 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
5877 * typeck.c (check_return_expr): Check for bare parameter packs.
5878 (comptypes): Compare template parameter packs and
5879 type pack expansions.
5880 * decl.c (grokdeclarator): Deal with the declaration of function
5882 (grokparms): Verify that the (optional) function parameter pack is
5883 at the end of the parameter list.
5884 (xref_basetypes): Handle pack expansions in the base class.
5885 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
5886 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
5887 (NONTYPE_ARGUMENT_PACK): New.
5888 (TYPE_PACK_EXPANSION): New.
5889 (EXPR_PACK_EXPANSION): New.
5890 (ARGUMENT_PACK_SELECT): New.
5891 * cp-objcp-common.c (cp_tree_size): Compute size of
5892 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
5893 ARGUMENT_PACK_SELECT.
5894 * error.c (dump_template_argument): Print template argument packs.
5895 (dump_template_argument_list): Ditto.
5896 (dump_template_parameter): Dump `...' for template type parameter
5898 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
5899 (dump_parameters): Print function parameter packs.
5900 (dump_template_parms): Print template argument packs.
5901 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
5902 (maybe_warn_variadic_templates): New.
5903 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
5904 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
5905 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
5907 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
5908 (write_template_arg): Write argument packs as separate arguments.
5909 * cp-tree.h (struct template_parm_index_s): Add flag that
5910 indicates that the template parameter is actually a parameter
5912 (struct tree_argument_pack_select): New.
5913 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
5914 (union lang_tree_node): Add argument_pack_select.
5915 (FUNCTION_PARAMETER_PACK_P): New.
5916 (PACK_EXPANSION_P): New.
5917 (PACK_EXPANSION_PATTERN): New.
5918 (SET_PACK_EXPANSION_PATTERN): New.
5919 (PACK_EXPANSION_PARAMETER_PACKS): New.
5920 (ARGUMENT_PACK_P): New.
5921 (ARGUMENT_PACK_ARGS): New.
5922 (SET_ARGUMENT_PACK_ARGS): New.
5923 (ARGUMENT_PACK_INCOMPLETE_P): New.
5924 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
5925 (TEMPLATE_PARM_PARAMETER_PACK): New.
5926 (TEMPLATE_TYPE_PARAMETER_PACK): New.
5927 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
5928 (ARGUMENT_PACK_SELECT_INDEX): New.
5929 (ARGUMENT_PACK_SELECT_ARG): New.
5930 (struct cp_declarator): Add parameter_pack_p flag.
5931 (maybe_warn_variadic_templates): Declare.
5932 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
5933 indicate a template parameter pack.
5934 (uses_parameter_packs): Declare.
5935 (template_parameter_pack_p): Declare.
5936 (template_parms_variadic_p): Declare.
5937 (make_pack_expansion): Declare.
5938 (check_for_bare_parameter_packs): Declare.
5939 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
5940 sizeof... expressions.
5941 (pp_cxx_expression): Print pack expansions and non-type argument
5943 (pp_cxx_exception_specification): Print pack expansions.
5944 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
5945 (pp_cxx_ctor_initializer): Print pack expansions.
5946 (pp_cxx_type_id): Print pack expansions.
5947 (pp_cxx_template_argument_list): Print argument packs.
5948 (pp_cxx_template_parameter): Print ellipsis for template parameter
5950 * pt.c (comp_template_parms): Compare template parameter packs.
5951 (template_parameter_pack_p): New.
5952 (template_parms_variadic_p): New.
5953 (template_args_variadic_p): New.
5954 (make_ith_pack_parameter_name): New.
5955 (struct find_parameter_pack_data): New.
5956 (find_parameter_packs_r): New.
5957 (uses_parameter_packs): New.
5958 (make_pack_expansion): New.
5959 (check_for_bare_parameter_packs): New.
5960 (expand_template_argument_pack): New.
5961 (reduce_template_parm_level): Propagate parameter pack flag.
5962 (process_template_parm): Add is_parameter_pack parameter to state
5963 when the parameter is actually a parameter pack. Create template
5964 parameter packs when is_parameter_pack is true.
5965 (current_template_args): The argument for a template parameter
5966 pack is an argument pack containing a single pack expansion.
5967 (process_partial_specialization): When checking that non-type
5968 argument expressions do not involve template parameters, loop over
5969 the arguments in argument packs separately.
5970 (push_template_decl_real): Check that the type of the declaration
5971 does not have any bare parameter packs. Check that primary
5972 templates have no more than one parameter pack, and that it comes
5973 at the end of the template parameter list.
5974 (convert_template_argument): Handle coercions for pack expansion
5975 expressions by coercing the pattern then rebuilding the expansion.
5976 (coerce_template_parms): When coercing the arguments for a
5977 variadic template, pack "extra" arguments into an argument pack.
5978 (coerce_template_template_parms): Cannot coerce between parameter
5979 packs and non-pack parameters.
5980 (template_args_equal): Compare PACK_EXPANSION_P expressions.
5981 (comp_template_args): Expand all template arguments packs before
5982 comparing template argument lists.
5983 (mangle_class_name_for_template): Make argument packs as separate
5985 (for_each_template_parm_r): No need to handle BASELINK.
5986 (instantiate_class_template): Handle pack expansions in the base
5988 (tsubst_pack_expansion): New.
5989 (tsubst_template_args): Handle substitutions of argument packs and
5990 pack expansion into template argument lists.
5991 (tsubst_decl): Expand function parameter packs into separate
5992 function parameters.
5993 (tsubst_arg_types): Expand a type pack expansion into separate
5995 (tsubst_exception_specification): Handle pack expansions in
5996 exception specifiers.
5997 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
5998 replacing a template parameter with its argument. If we encounter
5999 a substitution for an argument pack, just return the parameter
6001 (tsubst_copy): sizeof(X...) returns the number of elements in
6002 parameter pack X. See through ARGUMENT_PACK_SELECT when the
6003 PARM_DECL is a parameter pack.
6004 (tsubst_expr): Expression pack expansions and argument packs
6005 cannot show up here; they will all be handled through function
6006 calls, sizeof, and template argument lists.
6007 (tsubst_copy_and_build): sizeof(X...) returns the number of
6008 elements in parameter pack X. Handle pack expansions in TREE_LIST
6009 and CONSTRUCTOR nodes.
6010 (fn_type_unification): Handle "incomplete" explicit template
6011 argument lists that specify some of the arguments for a template
6013 (type_unification_real): Unify arguments against pack expansions.
6014 (template_parm_level_and_index): New, helper function.
6015 (unify_pack_expansion): New.
6016 (unify): Unify argument packs on an argument-by-argument basis,
6017 handling variadic argument packs as well.
6018 (more_specialized_fn): Handle unification of function parameter
6019 packs. All things being equal, prefer non-variadic function
6020 templates to variadic function templates.
6021 (more_specialized_class): Prefer the variadic class template
6022 partial specialization that binds fewer arguments to a parameter
6024 (regenerate_decl_from_template): Expand function parameter packs
6025 into separate parameters.
6026 (instantiate_decl): Ditto.
6027 (tsubst_initializer_list): Handle pack expansions for base-class
6029 (dependent_type_p_r): Determine dependent types in argument packs
6030 and pack expansions.
6031 (value_dependent_expression_p): Determine value-dependence of
6032 non-type argument packs.
6033 (dependent_template_arg_p): Handle argument packs.
6034 * semantics.c (finish_cond): Check for bare parameter packs.
6035 (finish_expr_stmt): Ditto.
6036 (finish_for_expr): Ditto.
6037 (finish_switch_cond): Ditto.
6038 (finish_mem_initializers): Ditto.
6039 * name-lookup.c (arg_assoc_type): Handle pack expansions and
6041 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
6042 * parser.c (make_declarator): Declarator is not an expansion.
6043 (make_pointer_declarator): Transfer parameter pack flag to outer
6045 (make_reference_declarator): Ditto.
6046 (make_ptrmem_declarator): Ditto.
6047 (make_call_declarator): Ditto.
6048 (make_array_declarator): Ditto.
6049 (cp_parser_postfix_expression): Allow pack expansion expressions
6050 in the argument list for a call expression.
6051 (cp_parser_parenthesized_expression_list): Add new parameter
6052 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
6053 into separate arguments."
6054 (cp_parser_new_placement): Allow pack expansion expressions.
6055 (cp_parser_new_initializer): Ditto.
6056 (cp_parser_mem_initializer_list): Allow ellipsis to create a
6057 base-class initializer expansion.
6058 (cp_parser_mem_initializer): Ditto.
6059 (cp_parser_template_parameter_list): Keep track of whether the
6060 template parameter is a template parameter pack.
6061 (cp_parser_template_parameter): Parse the ellipsis to indicate a
6062 template parameter pack.
6063 (cp_parser_type_parameter): Ditto.
6064 (cp_parser_template_argument_list): Parse the ellipsis to indicate
6066 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
6067 this declarator is a parameter pack.
6068 (cp_parser_parameter_declaration): The ellipsis does not end the
6069 parameter declaration, because it might be a parameter pack. Parse
6070 the ellipsis to indicate a parameter pack.
6071 (cp_parser_initializer): Allow pack expansions.
6072 (cp_parser_initializer_list): Allow ellipsis to create an
6073 initializer expansion.
6074 (cp_parser_base_clause): Allow ellipsis to create a base specifier
6076 (cp_parser_type_id_list): Allow ellipsis to create an exception
6077 specifier expansion.
6078 (cp_parser_attribute_list): Don't allow pack expansions.
6079 (cp_parser_functional_cast): Allow pack expansions.
6080 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
6081 compute the length of a parameter pack.
6082 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
6083 end a template argument.
6084 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
6085 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
6088 2007-03-09 Dirk Mueller <dmueller@suse.de>
6090 * call.c (build_new_op): Call warn_logical_operator.
6092 2007-03-08 Volker Reichelt <v.reichelt@netcologne.de>
6095 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
6098 * pt.c (any_template_arguments_need_structural_equality_p):
6101 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
6103 * decl.c (grokdeclarator): Disable warnings for anonymous
6106 2007-03-05 Volker Reichelt <v.reichelt@netcologne.de>
6108 * typeck2.c (readonly_error): Always emit a hard error.
6109 Remove last argument.
6110 * cp-tree.h (readonly_error): Adjust prototype.
6111 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
6112 * typeck.c (build_unary_op): Likewise.
6113 (build_modify_expr): Likewise.
6115 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
6118 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
6120 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6123 * parser.c (struct cp_parser): New IN_IF_STMT.
6124 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
6125 returning if parsing the body of an 'if' statement or issuing an
6126 error and continuing.
6127 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
6129 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
6131 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
6134 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
6137 2007-03-02 Geoffrey Keating <geoffk@apple.com>
6139 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
6140 Objective-C++. Don't exit early if -shared-libgcc needs to be
6143 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6145 * typeck.c (common_base_type): Delete unused function.
6147 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
6149 * Make-lang.in: Add dummy lang.install-pdf target.
6151 2007-03-01 Simon Baldwin <simonb@google.com>
6154 * decl.c (check_tag_decl): Added new warning for typedef ignored
6155 when it precedes an otherwise valid non-typedef declaration.
6157 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
6159 * typeck.c (build_function_call): Store converted arguments
6160 in a stack-allocated array instead of building a list.
6161 (convert_arguments): Store arguments in the array passed in as an
6162 argument, and return the actual number of arguments.
6163 * call.c (build_call): Delete, and replace with...
6164 (build_call_n, build_call_a): New.
6165 (build_op_delete_call): Rewrite to avoid constructing argument lists.
6166 (build_over_call): Store converted arguments in a stack-allocated
6167 array instead of building a list.
6168 (build_cxx_call): Pass arguments in an array instead of as a list.
6169 (build_java_interface_fn_ref): Rewrite to avoid constructing
6171 * tree.h: Update declarations to reflect above changes.
6172 * method.c (use_thunk): Use a stack-allocated array to hold
6173 the arguments instead of a list.
6174 * rtti.c (throw_bad_cast): Update call to cxx_call.
6175 (throw_bad_typeid): Likewise.
6176 (build_dynamic_cast_1): Likewise.
6177 * init.c (build_builtin_delete_call): Use build_call_n.
6178 * decl.c (expand_static_init): Likewise.
6179 * except.c (cp_protect_cleanup_actions): Likewise.
6180 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
6181 (gimplify_must_not_throw_expr): Likewise.
6182 (cxx_omp_apply_fn): Use build_call_a.
6184 2007-02-26 Mark Mitchell <mark@codesourcery.com>
6186 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
6187 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
6189 2007-02-25 Mark Mitchell <mark@codesourcery.com>
6191 * cp-tree.h (static_ctors): Remove.
6192 * cp-tree.h (static_dtors): Likewise.
6193 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
6194 refactoring of tree_map hierarchy.
6195 (decl_shadowed_for_var_insert): Likewise.
6196 * semantics.c (expand_body): Use c_expand_body.
6197 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
6198 * decl2.c (static_ctors): Remove.
6199 (static_dtors): Likewise.
6200 (generate_ctor_or_dtor_function): Pass NULL_TREE to
6201 objc_generate_static_init_call. Do not call static_[cd]tors.
6202 (generate_ctor_and_dtor_functions_for_priority): Do not check for
6204 (cp_write_global_declarations): Likewise.
6206 2007-02-23 Richard Guenther <rguenther@suse.de>
6208 * class.c (note_name_declared_in_class): Make declaration
6209 changes meaning a pedwarn.
6211 2007-02-22 Michael Matz <matz@suse.de>
6214 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
6215 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
6216 dump_function_decl): Guard emitting outer scopes by new flag.
6217 * cp-lang.c (cxx_dwarf_name): New function.
6218 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
6219 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
6221 (push_template_decl_real, lookup_template_class): Remove calls
6224 2007-02-19 Mark Mitchell <mark@codesourcery.com>
6226 * call.c (build_new_method_call): Ensure that explicit calls of
6227 destructors have type "void".
6229 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6231 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
6232 and -Walways-true with -Waddress.
6233 * cvt.c (convert_to_void): Replace unconditional warning with
6236 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
6238 * decl.c, tree.c: Fix comment typos.
6240 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
6243 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
6244 statement expression if we had an error mark node.
6246 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
6247 Brooks Moses <brooks.moses@codesourcery.com>
6248 Lee Millward <lee.millward@codesourcery.com>
6250 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
6251 Change class to tcc_vl_exp.
6253 * call.c (build_call): Use build_call_list instead
6255 (build_over_call): Likewise.
6256 (build_new_method_call): Use build_min_non_dep_call_list
6257 instead of build_min_non_dep.
6259 * error.c (dump_call_expr_args): New function.
6260 (dump_aggr_init_expr_args): New function.
6261 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
6262 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
6264 * cvt.c (convert_to_void): Use build_call_array instead
6265 of build3; use new AGGR_INIT_EXPR accessor macros.
6267 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
6268 instead of TREE_CODE_LENGTH.
6270 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
6271 AGGR_INIT_EXPR accessor macros.
6273 * cp-gimplify.c (cp_gimplify_init_expr): Use
6274 AGGR_INIT_EXPR_SLOT to set the slot operand.
6276 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
6277 (AGGR_INIT_EXPR_SLOT): New macro.
6278 (AGGR_INIT_EXPR_ARG): New macro.
6279 (aggr_init_expr_nargs): New macro.
6280 (AGGR_INIT_EXPR_ARGP): New macro.
6281 (aggr_init_expr_arg_iterator): New.
6282 (init_aggr_init_expr_arg_iterator): New.
6283 (next_aggr_init_expr_arg): New.
6284 (first_aggr_init_expr_arg): New.
6285 (more_aggr_init_expr_args_p): New.
6286 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
6287 (stabilize_aggr_init): New declaration.
6288 (build_min_non_dep_call_list): Likewise.
6290 * tree.c (process_aggr_init_operands): New function.
6291 (build_aggr_init_array) New function.
6292 (build_cplus_new): Update to use new CALL_EXPR and
6293 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
6294 build_aggr_init_array.
6295 (build_min_non_dep_call_list) New function.
6296 (build_min_nt): Assert input code parameter is not a variable
6297 length expression class.
6298 (build_min, build_min_non_dep): Likewise.
6299 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
6300 to check for equality instead of recursing. Handle tcc_vl_exp
6302 (stabilize_call): Update to only handle CALL_EXPRs, not
6303 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
6304 (stabilize_aggr_init): New function.
6305 (stabilize_init): Use it.
6307 * cxx-pretty-print.c (pp_cxx_postfix_expression)
6308 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
6309 AGGR_INIT_EXPR accessor macros and argument iterators.
6311 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
6312 build_vl_exp. Iterate through the operands, recursively
6313 processing each one.
6314 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
6315 CALL_EXPR accessor macros.
6316 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
6317 tree code classes. Use TREE_OPERAND_LENGTH instead of
6320 * semantics.c (finish_call_expr): Use build_nt_call_list
6321 instead of build_nt.
6322 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
6323 accessor macros. Use build_call_array to construct the
6324 CALL_EXPR node instead of build3
6326 * decl2.c (build_offset_ref_call_from_tree): Use
6327 build_nt_call_list and build_min_non_dep_call_list instead
6328 of build_min_nt and build_min_non_dep.
6330 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
6331 Use build_nt_call_list instead of build_min_nt.
6333 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6336 * call.c (build_conditional_expr): Improve error message.
6338 2007-02-13 Dirk Mueller <dmueller@suse.de>
6340 * friend.c (do_friend): Annotate warning about friend
6341 declarations in templates with OPT_Wnon_template_friend.
6342 Convert informal message from warning() to inform().
6344 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
6345 Mark Mitchell <mark@codesourcery.com>
6348 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
6349 instantiations for variables.
6351 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6354 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
6355 Check warn_unused_value just once.
6357 2007-02-11 Mark Mitchell <mark@codesourcery.com>
6360 * pt.c (determine_specialization): Use skip_artificial_parms_for.
6361 (fn_type_unificiation): Likewise.
6362 (get_bindings): Likewise.
6364 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
6367 * decl.c (finish_function): Use DECL_REPLACEABLE.
6368 * tree.c (cp_cannot_inline_tree_fn): Likewise.
6370 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
6372 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
6374 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
6376 * decl.c (grokvardecl): Don't error if !have_tls.
6377 (grokdeclarator): Likewise.
6378 * parser.c (cp_parser_omp_threadprivate): Likewise.
6380 2007-02-07 Jakub Jelinek <jakub@redhat.com>
6383 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
6384 parameters and result decls in omp clauses.
6385 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
6388 2007-02-05 Dirk Mueller <dmueller@suse.de>
6391 * parser.c (cp_parser_class_specifier): Always initialize bases.
6393 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
6395 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
6396 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
6397 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
6399 * semantics.c (finish_omp_atomic): Store a whole expression node
6400 in operand 1, and integer_zero_node in operand 0, for dependent
6401 OMP_ATOMIC. Rewrite to make flow easier to understand.
6403 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6405 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
6407 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
6409 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
6410 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
6412 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
6414 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
6415 keyword warning to -Wc++0x-compat.
6417 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6419 * decl.c (grokdeclarator): Update documentation.
6421 2007-02-02 Jakub Jelinek <jakub@redhat.com>
6424 * decl.c (grokdeclarator): If __thread is used together with
6425 a storage class other than extern and static, clear thread_p
6426 after issuing diagnostics and fall through to checking the
6429 2007-01-30 Roger Sayle <roger@eyesopen.com>
6431 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
6432 calculating the size of an array (to avoid recursive errors).
6434 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6437 * typeck.c (build_binary_op): Fix logic for warning. Move warning
6439 * call.c (convert_like_real): Don't warn when converting to
6442 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6444 * decl.c (pop_label): Replace warning with call to
6445 warn_for_unused_label.
6447 2007-01-28 Andrew Pinski <pinskia@gmail.com>
6450 * semantics.c (finish_pseudo_destructor_expr): Check the
6451 destrutor name by calling check_dtor_name.
6453 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
6455 * lex.c (D_CPP0X): Rename.
6457 (reswords): D_CPP0X -> D_CXX0X.
6458 (init_reswords): Ditto.
6459 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
6460 of C++0x keywords as identifiers.
6462 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
6465 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
6468 2007-01-23 Ian Lance Taylor <iant@google.com>
6470 * typeck.c (convert_for_assignment): Only warn about a = b = c
6471 when converting to bool.
6473 2007-01-23 Roger Sayle <roger@eyesopen.com>
6475 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
6477 * typeck.c (ignore_overflows): Remove the remaining uses of
6478 TREE_CONSTANT_OVERFLOW.
6480 2007-01-20 Jan Hubicka <jh@suse.cz>
6482 * decl2.c (start_objects, start_static_storage_duration_function):
6483 Do not make the functions uninlinable.
6485 2007-01-17 Ian Lance Taylor <iant@google.com>
6487 * class.c (add_method): Call VEC_reserve_exact rather than passing
6488 a negative size to VEC_reserve.
6490 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
6493 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
6495 2007-01-10 Mark Mitchell <mark@codesourcery.com>
6498 * decl.c (make_typename_type): If the qualified name is not a
6499 type, issue an error.
6500 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
6503 2007-01-08 Geoffrey Keating <geoffk@apple.com>
6505 * rtti.c: Include target.h.
6506 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
6507 don't emit typeinfo for fundamental types as weak.
6508 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
6510 2007-01-08 Richard Guenther <rguenther@suse.de>
6512 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
6514 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
6516 * call.c (standard_conversion): Pass flag to
6517 vector_types_convertible_p to disallow emission of note.
6518 * typeck.c (convert_for_assignment): Pass flag to
6519 vector_types_convertible_p to allow emission of note.
6520 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
6521 to disallow emission of note.
6523 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6526 * typeck.c (build_binary_op): Call overflow_warning if
6527 TREE_OVERFLOW_P is true for the result and not for any of the
6530 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
6533 * class.c (add_method): Don't wait until template
6534 instantiation time to complain about duplicate methods.
6536 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6539 * semantics.c (finish_unary_op_expr): Warn only if result
6540 overflowed and operands did not.
6542 2007-01-05 Ian Lance Taylor <iant@google.com>
6544 * typeck.c (build_binary_op): Warn about comparing a non-weak
6547 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
6549 * pt.c (tsubst): Propagate the need for structural equality checks
6550 when reducing the level of template parameters.
6552 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
6554 * pt.c: Fix a comment typo.
6556 2007-01-02 Ian Lance Taylor <iant@google.com>
6558 * semantics.c (maybe_convert_cond): Optionally warn when using an
6559 assignment as a condition.
6560 * typeck.c (convert_for_assignment): Optionally warn about
6561 assigning the result of an assignment to a bool.
6563 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
6565 * pt.c (canonical_template_parms): Correct typo in comment.
6567 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
6569 * typeck.c (structural_comptypes): Renamed from "comptypes".
6570 (comptypes): Use canonical type information to perform fast type
6571 comparison. When VERIFY_CANONICAL_TYPES, verify that the
6572 canonical type comparison returns the same results as we would see
6573 from the current, structural check. Support COMPARE_STRUCTURAL
6574 when we need structural checks.
6575 * decl.c (typename_compare): Fix comment.
6576 (build_typename_type): TYPENAME_TYPE nodes require structural
6577 equality checks, because they resolve different based on the
6579 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
6580 require structural equality checks (for now).
6581 (build_ptrmemfunc_type): Build the canonical pointer to member
6583 (compute_array_index_type): Whenever we build a new index type
6584 to represent the size of an array in a template, we need to mark
6585 this index type as requiring structural equality. This goes for
6586 arrays with value-dependent sizes with the current ABI, or all
6588 * tree.c (cplus_array_hash): New.
6589 (struct cplus_array_info): New.
6590 (cplus_array_compare): New.
6591 (cplus_array_htab): New.
6592 (build_cplus_array_type_1): Use a hash table to cache the array
6593 types we build. Build the canonical array type for each array
6595 (cp_build_qualified_type_real): When building a cv-qualified array
6596 type, use the hash table of array types and build canonical array
6598 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
6599 use structural equality (for now).
6600 * cp-tree.h (COMPARE_STRUCTURAL): New.
6601 * pt.c (canonical_template_parms): New.
6602 (canonical_type_parameter): New.
6603 (process_template_parm): Find the canonical type parameter.
6604 (lookup_template_class): When we have named the primary template
6605 type, set the canonical type for our template class to the primary
6606 template type. If any of the template arguments need structural
6607 equality checks, the template class needs structural equality
6609 (tsubst): When reducing the level of a template template
6610 parameter, we require structural equality tests for the resulting
6611 parameter because its template parameters have not had their types
6612 canonicalized. When reducing a template type parameter, find the
6613 canonical reduced type parameter.
6614 (any_template_arguments_need_structural_equality_p): New.