1 2008-12-31 Jakub Jelinek <jakub@redhat.com>
4 * parser.c (cp_parser_primary_expression) <case RID_FUNCTION_NAME>:
5 Return error_mark_node if cp_parser_non_integral_constant_expression
9 * semantics.c (finish_decltype_type): Handle TEMPLATE_PARM_INDEX.
11 2008-12-29 Jakub Jelinek <jakub@redhat.com>
14 * parser.c (cp_parser_condition): Use cp_parser_require
15 instead of cp_lexer_consume_token to consume =.
18 * decl.c (start_enum): If enumtype is error_mark_node, exit early.
20 2008-12-28 Jakub Jelinek <jakub@redhat.com>
23 * semantics.c (finish_omp_for): Don't add CLEANUP_POINT_EXPR
24 around volatile iteration var in condition and/or increment
27 2008-12-27 Jakub Jelinek <jakub@redhat.com>
30 * pt.c (tsubst_omp_for_iterator): RECUR on whole init_expr instead of
33 2008-12-21 Jason Merrill <jason@redhat.com>
36 * name-lookup.c (arg_assoc_type): Handle DECLTYPE_TYPE.
38 2008-12-20 Jakub Jelinek <jakub@redhat.com>
39 Manuel López-Ibáñez <manu@gcc.gnu.org>
42 * c-common.c (warn_about_parentheses): Remove ARG_UNUSED from
43 arg_left. Don't warn about X<=Y<=Z if comparison's type isn't
46 2008-12-19 Jakub Jelinek <jakub@redhat.com>
49 * call.c (build_new_method_call): Handle call being COMPOUND_EXPR
52 2008-12-18 Jakub Jelinek <jakub@redhat.com>
55 * init.c (perform_member_init): For value-initialized
56 references call permerror instead of warning and don't emit any
59 2008-12-18 Jason Merrill <jason@redhat.com>
62 * parser.c (cp_parser_token_starts_cast_expression): An EOF
63 can't start a cast-expression.
65 2008-12-17 Jason Merrill <jason@redhat.com>
67 * semantics.c (describable_type): New function.
68 (finish_decltype_type): Use it for dependent exprs.
69 * cp-tree.h: Declare it.
70 * mangle.c (write_type) [DECLTYPE_TYPE]: Set skip_evaluation.
71 (write_expression): If skip_evaluation, use type stubs.
72 * tree.c (cp_tree_equal): Handle PARM_DECLs from different
73 declarations of a function.
74 * init.c (build_new): Do auto deduction if type is describable.
75 * decl.c (cp_finish_decl): Likewise.
76 * parser.c (cp_parser_omp_for_loop): Likewise.
78 2008-12-10 Jason Merrill <jason@redhat.com>
81 * mangle.c (write_builtin_type): Add mangling for decimal floating
82 point and fixed point types.
83 (write_type): Pass FIXED_POINT_TYPE along.
85 2008-12-09 Mark Mitchell <mark@codesourcery.com>
88 * class.c (resolve_address_of_overloaded_function): Check
89 accessibility of member functions unless FLAGS indicates
91 * call.c (standard_conversion): Adjust flags passed to
93 (convert_default_arg): Do not perform access checks.
94 * cp-tree.h (tsubst_flags_t): Add tf_no_access_control.
96 2008-12-08 Steve Ellcey <sje@cup.hp.com>
98 * decl2.c (mark_used): Remove assemble_external call.
100 2008-12-08 Dodji Seketeli <dodji@redhat.com>
103 * name-lookup.c (kept_level_p): Don't forget the case of levels
104 having using directives.
106 2008-12-08 Richard Henderson <rth@redhat.com>
109 * class.c (finish_struct_bits): Use SET_TYPE_MODE.
110 * decl.c (record_unknown_type): Likewise.
111 (start_enum, finish_enum): Likewise.
113 2008-12-05 Jakub Jelinek <jakub@redhat.com>
116 * error.c (dump_expr): Handle BIT_FIELD_REF.
118 2008-12-05 Sebastian Pop <sebastian.pop@amd.com>
121 * Make-lang.in (cc1plus-dummy, cc1plus): Add BACKENDLIBS,
124 2008-12-04 Jason Merrill <jason@redhat.com>
127 * decl.c (grok_special_member_properties): Set TYPE_HAS_COMPLEX_DFLT
129 * class.c (check_bases_and_members): Rather than assuming any
130 user-declared default constructor is complex here.
132 2008-12-04 Richard Guenther <rguenther@suse.de>
135 * typeck.c (get_member_function_from_ptrfunc): Mark the vtbl
136 pointer access with TREE_NO_WARNING.
138 2008-12-03 Jason Merrill <jason@redhat.com>
141 * init.c (build_value_init): Do initial zero-initialization
142 of a class with an implicitly-defined constructor using
143 build_zero_init rather than in build_value_init.
144 (build_value_init_1): Fold into build_value_init.
147 * parser.c (cp_parser_conversion_type_id): Diagnose
148 'operator auto' here.
149 * decl.c (grokdeclarator): Not here.
152 * decl.c (grokdeclarator): Only set DECL_NONCONVERTING_P
153 on explicit constructors.
154 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Propagate
155 CONSTRUCTOR_IS_DIRECT_INIT.
157 2008-12-02 Jason Merrill <jason@redhat.com>
159 PR c++/35782, c++/37860
160 * call.c (build_user_type_conversion_1): Remember
162 (convert_like_real): Likewise.
163 (build_over_call): Don't require the copy constructor
164 for copy-list-initialization.
165 * cp-tree.h (TARGET_EXPR_LIST_INIT_P): New macro.
168 * decl.c (cp_finish_decl): Handle =default and =delete for
171 2008-12-01 Jakub Jelinek <jakub@redhat.com>
174 * parser.c (cp_parser_omp_for_loop): Handle auto.
175 * pt.c (tsubst_omp_for_iterator): Likewise.
177 2008-11-28 Jason Merrill <jason@redhat.com>
180 * init.c (perform_member_init): Fix value-initialization.
181 (build_value_init_1): Add assert to catch cases that will break
183 (build_default_init): Remove.
184 * cp-tree.h: Remove its prototype.
185 * pt.c (tsubst_expr) [DECL_EXPR]: Use build_value_init for
186 value-initialization.
189 * parser.c (cp_parser_class_name): Only call
190 maybe_note_name_used_in_class if we actually found a class name.
192 2008-11-25 Jason Merrill <jason@redhat.com>
195 * decl2.c (check_classfn): Error rather than abort on parameter
198 2008-11-20 Jason Merrill <jason@redhat.com>
201 * parser.c (cp_parser_class_name): Call maybe_note_name_used_in_class.
204 * call.c (build_over_call): Take the address of the function even
206 (build_new_method_call): Remember the type of the called function
209 2008-11-19 Dodji Seketeli <dodji@redhat.com>
212 * pt.c (coerce_template_template_parm): Use the more robust
213 uses_template_parms instead of dependent_type_p.
215 2008-11-19 Dodji Seketeli <dodji@redhat.com>
218 * pt.c (lookup_template_class): Check pointers before dereferencing
220 * error.c (dump_template_decl): Likewise.
222 2008-11-19 Jason Merrill <jason@redhat.com>
225 * decl2.c (grokfield): Pass ATTR_FLAG_TYPE_IN_PLACE for a typedef
226 that names a class for linkage purposes.
229 * parser.c (cp_parser_pseudo_destructor_name): A pseudo-destructor
230 name is not a declaration.
233 * pt.c (instantiate_decl): Don't require a definition of
234 a template that is explicitly instantiated 'extern'.
236 2008-11-18 Jason Merrill <jason@redhat.com>
237 Jakub Jelinek <jakub@redhat.com>
240 * parser.c (cp_parser_type_id): Complain about auto.
241 * decl.c (grokdeclarator): Complain about parameters and
242 conversion functions declared with auto.
244 * call.c (standard_conversion): Use CLASS_TYPE_P instead of
246 * cp-tree.h (TYPE_NON_AGGREGATE_CLASS): Likewise.
248 2008-11-17 Jakub Jelinek <jakub@redhat.com>
251 * init.c (constant_value_1): Handle TREE_LIST init.
253 2008-11-15 Jakub Jelinek <jakub@redhat.com>
256 * typeck.c (cp_build_unary_op): Don't call get_unwidened. Use
257 argtype instead of result_type.
259 2008-11-14 Jason Merrill <jason@redhat.com>
262 * semantics.c (finish_call_expr): Don't repeat arg-dep lookup
263 for a non-dependent call.
266 * call.c (build_aggr_conv): Increment i.
268 2008-11-13 Jason Merrill <jason@redhat.com>
271 * typeck2.c (process_init_constructor_record): Update bitfield
273 (check_narrowing): Update bitfield handling, print source type.
275 2008-11-12 Jakub Jelinek <jakub@redhat.com>
279 2007-05-07 Mike Stump <mrs@apple.com>
280 * parser.c (check_empty_body): Add.
281 (cp_parser_iteration_statement): Add call to check_empty_body.
283 2008-11-12 Jason Merrill <jason@redhat.com>
286 * typeck.c (cp_build_modify_expr): Update bitfield handling.
288 2008-11-12 Jakub Jelinek <jakub@redhat.com>
291 * parser.c (cp_parser_simple_declaration): Don't commit
292 to tentative parse if parse errors were seen.
295 * error.c (dump_expr): Handle COMPLEX_EXPR.
297 2008-11-10 Jakub Jelinek <jakub@redhat.com>
300 * parser.c (cp_parser_enum_specifier): After parsing :,
301 parse definitely. Don't return early if type specifier
304 2008-11-06 David Edelsohn <edelsohn@gnu.org>
307 * g++spec.c (LIBSTDCXX_STATIC): New.
308 (lang_spec_driver): Use LIBSTDCXX_STATIC when not
311 2008-11-05 Fabien Chêne <fabien@gcc.gnu.org>
314 * cp-tree.h: Fix DECL_NONSTATIC_MEMBER_P to handle member template
317 2008-11-05 Richard Guenther <rguenther@suse.de>
320 * decl.c (start_preparsed_function): Use the correct type for
321 building the RESULT_DECL.
323 2008-10-31 Jakub Jelinek <jakub@redhat.com>
326 * decl.c (grokdeclarator): Diagnose auto function decl without
327 late return type and late return type function decl where type
331 * decl.c (cp_finish_decl): Diagnose type_uses_auto type with
334 2008-10-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
337 * class.c (check_bitfield_decl): Rename min_precision to
338 tree_int_cst_min_precision.
339 * decl.c (finish_enum): Likewise.
341 2008-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
344 * parser.c (cp_parser_token_starts_cast_expression): New.
345 (cp_parser_cast_expression): Peek the next token to decide whether
346 this could be a parenthesized constructor or is definitely an
349 2008-10-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
352 * typeck.c (build_x_binary_op): Update call to
353 warn_about_parentheses.
354 * parser.c (cp_parser_binary_expression): Add note about passing
355 the correct code for unary expressions.
357 2008-10-24 Jakub Jelinek <jakub@redhat.com>
359 * Make-lang.in (check-c++-subtargets): New alias for
360 check-g++-subtargets.
361 (lang_checks_parallelized): Add check-g++.
362 (check_g++_parallelize): New variable.
364 2008-10-21 Richard Guenther <rguenther@suse.de>
366 * semantics.c (simplify_aggr_init_exprs_r): Remove.
367 (expand_or_defer_fn): Do not walk the function body to
368 simplify aggr_init_exprs.
370 2008-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
373 * typeck.c (cp_common_type): New. The same as
374 type_after_usual_arithmetic_conversions but without promotions.
375 (type_after_usual_arithmetic_conversions): Do the promotions and
377 (common_type): Make it behave like the C version of this
378 function. Do not handle pointer types.
379 (common_pointer_type): Move handling of pointer types from
381 (cp_build_binary_op): Use common_pointer_type instead of
382 common_type in call to pointer_diff.
383 Use cp_common_type instead of common_type.
384 * cp-tree.h (common_pointer_type): Declare.
386 2008-10-14 Jakub Jelinek <jakub@redhat.com>
389 * cp-gimplify.c (cp_genericize_r): Only fold_convert COND_EXPR
390 arguments if they don't already have COND_EXPR's type.
392 2008-10-14 Paolo Carlini <paolo.carlini@oracle.com>
395 * pt.c (push_template_decl_real): Check that current_template_parms
397 (process_partial_specialization): Assert current_template_parms not
400 2008-10-13 Doug Evans <dje@google.com>
402 * cp-tree.h (DECL_MAIN_P): Fix parentheses around expression.
404 2008-10-10 Jakub Jelinek <jakub@redhat.com>
407 * cp-gimplify.c (cp_genericize_r): Fix up bitfield operands of
410 2008-10-09 Jakub Jelinek <jakub@redhat.com>
413 * semantics.c (finalize_nrv_r): Clear DECL_INITIAL instead of
414 setting it to error_mark_node.
416 2008-10-07 Steve Ellcey <sje@cup.hp.com>
418 * decl.c (start_cleanup_fn): Declare as inline.
420 2008-10-06 Jason Merrill <jason@redhat.com>
422 PR c++/37376, other mangling issues
423 * mangle.c (write_type): Update TYPE_PACK_EXPANSION mangling.
424 (write_member_name): Break out from...
425 (write_expression): ...here. Handle dependent COMPONENT_REF.
426 (write_template_arg): Wrap an argument pack in 'I'/'E'.
427 (write_builtin_type): Update char16/32_t mangling.
428 (write_nested_name, write_prefix): Don't forget template args
430 * operators.def: Add ARROW_EXPR, update COMPONENT_REF and
433 2008-10-06 Aldy Hernandez <aldyh@redhat.com>
435 * typeck.c (build_x_indirect_ref): Add location argument.
436 (cp_build_binary_op): Pass location to warn_for_div_by_zero.
437 (cp_build_unary_op): Add location argument.
438 (cp_build_modify_expr): Same.
439 * class.c (build_base_path): Pass location to build_indirect_ref.
440 * semantics.c (handle_omp_for_class_iterator): Pass elocus to
443 2008-10-05 Dodji Seketeli <dodji@redhat.com>
446 * cp-gimplify.c (cp_gimplify_expr): For each USING_STMT
447 make sure an IMPORTED_DECL node is added to the BLOCK_VARS list
448 of the innermost containing BLOCK.
450 2008-10-03 Paolo Carlini <paolo.carlini@oracle.com>
453 * error.c (dump_function_decl): Save the exceptions in case of
454 error about incompatible specifications in a specialization.
456 2008-10-01 Andrew Pinski <andrew_pinski@playstation.sony.com>
458 * tree.c (lvalue_p_1): COMPOUND_LITERAL_EXPR is also an lvalue.
460 2008-09-30 H.J. Lu <hongjiu.lu@intel.com>
463 * parser.c (cp_parser_selection_statement): Fix uninitialized
466 2008-09-30 Simon Martin <simartin@users.sourceforge.net>
470 * decl.c (grokdeclarator): Set the type for typedefs to a
471 nested-name-specifier to error_mark_node.
473 2008-09-30 Paolo Bonzini <bonzini@gnu.org>
475 * parser.c (cp_parser_selection_statement): Implement here the
476 -Wempty-body warning for `if' and `else' statements.
477 * semantics.c (finish_if_stmt): Do not call empty_body_warning.
479 2008-09-25 Paolo Carlini <paolo.carlini@oracle.com>
482 * name-lookup.c (maybe_process_template_type_declaration): Check
483 return value of push_template_decl_real for error_mark_node.
485 2008-09-24 Aldy Hernandez <aldyh@redhat.com>
487 * semantics.c (finish_fname): Pass location to fname_decl.
489 2008-09-23 Jakub Jelinek <jakub@redhat.com>
492 * semantics.c (finish_omp_for): If processing_template_decl, just build
493 MODIFY_EXPR for init instead of calling cp_build_modify_expr.
495 2008-09-23 Aldy Hernandez <aldyh@redhat.com>
497 * typeck.c (build_array_ref): Pass location to cp_build_binary_op.
498 (get_member_function_from_ptrfunc): Same.
499 (build_x_binary_op): Same.
500 (build_binary_op): Same.
501 (cp_build_binary_op): New location argument.
502 (pointer_diff): Pass location to cp_build_binary_op.
503 (cp_truthvalue_conversion): Pass location to build_binary_op.
504 (convert_ptrmem): Pass location to cp_build_binary_op.
505 (cp_build_modify_expr): Same.
506 (build_ptrmemfunc): Same.
507 * init.c (expand_cleanup_for_base): Pass location to
508 c_common_truthvalue_conversion.
509 (build_new_1): Pass location to cp_build_binary_op.
510 (build_vec_delete_1): Pass location to *build_binary_op,
511 c_common_truthvalue_conversion.
512 (build_vec_init): Same.
513 (build_delete): Same.
514 * decl.c (compute_array_index_type): Same.
515 * call.c (build_new_op): Same.
516 * rtti.c (build_dynamic_cast_1): Same.
517 * cp-tree.h: Add argument to cp_build_binary_op.
518 * semantics.c (handle_omp_for_class_iterator): Pass location to
519 *build_binary_op, c_common_truthvalue_conversion.
520 * decl2.c (get_guard_cond): Same.
522 2008-09-17 Richard Guenther <rguenther@suse.de>
525 * rtti.c (build_dynamic_cast_1): Convert the COND_EXPR
526 result to the correct type.
528 2008-09-17 H.J. Lu <hongjiu.lu@intel.com>
531 * name-lookup.c (pushdecl_maybe_friend): Don't return the old
532 parameter for duplicate.
534 2008-09-17 Jason Merrill <jason@redhat.com>
537 * name-lookup.c (lookup_type_scope): Look through sk_function_parms.
539 2008-09-17 Jakub Jelinek <jakub@redhat.com>
542 * typeck.c (build_array_ref): Use protected_set_expr_location instead
543 of SET_EXPR_LOCATION when ret might not be an expression.
545 2008-09-17 Jan Hubicka <jh@suse.cz>
548 * cp/decl.c (start_method): Set DECL_NO_INLINE_WARNING_P.
550 2008-09-16 Jakub Jelinek <jakub@redhat.com>
553 * semantics.c (finish_compound_literal): Return error_mark_node if
557 * lex.c (init_reswords): Don't populate ridpointers for D_CONLY
560 2008-09-15 Aldy Hernandez <aldyh@redhat.com>
562 * decl.c (duplicate_decls): Call error_at.
563 (grokfndecl): New location argument. Use location if available.
564 (grokdeclarator): Pass declarator location to grokfndecl.
565 * cp-tree.h (struct cp_declarator): Update comment for id_loc.
566 * decl2.c (check_classfn): Use error_at.
567 * parser.c (cp_parser_init_declarator): Set function_start_locus
569 (cp_parser_member_declaration): Set id_loc for function declarators.
571 2008-09-09 Jan Hubicka <jh@suse.cz>
574 * pt.c (tsubst_decl): Do not copy DECL_STRUCT_FUNCTION pointer.
576 2008-09-09 Jakub Jelinek <jakub@redhat.com>
579 * tree.c (array_type_nelts_top): Add size_one_node instead of
582 2008-09-09 Jason Merrill <jason@redhat.com>
585 * pt.c (tsubst_copy) [PARM_DECL]: Don't abort if the parm has
588 2008-09-09 Jakub Jelinek <jakub@redhat.com>
591 * decl.c (build_enumerator): Handle previous value's DECL_INITIAL
592 being error_operand_p. Don't clear value if it was error_mark_node.
594 2008-09-09 Paolo Bonzini <bonzini@gnu.org>
596 * cp-objcp-common.h (LANG_HOOKS_EXPAND_DECL): Remove.
597 * cp-tree.h: Don't mention DECL_ANON_UNION_ELEMS.
598 * semantics.c (anon_aggr_type_p): Remove.
600 2008-09-06 Jason Merrill <jason@redhat.com>
603 * parser.c (cp_parser_parameter_declaration_list): Process the
604 PARM_DECLs as we go and push them. Return a TREE_LIST.
605 (cp_parser_parameter_declaration_clause): Return a TREE_LIST.
606 (cp_parser_direct_declarator): Create a binding level and
607 suppress deprecated warnings in the parameter list.
608 (make_call_declarator): PARMS is now a tree.
609 * cp-tree.h (struct cp_declarator): Function parms are now a tree.
610 * decl.h (enum deprecated_states, deprecated_state): Move here.
612 (type_is_deprecated): New fn.
613 (grokparms): PARMLIST is a tree now. Warn about parms that
614 use deprecated types.
615 * mangle.c (write_expression): Handle PARM_DECL, CALL_EXPR and
617 * pt.c (tsubst) [DECLTYPE_TYPE]: Set skip_evaluation.
618 (tsubst_copy) [PARM_DECL]: Handle a PARM_DECL used outside of a
620 * name-lookup.c (pushtag): Look through function parameter scopes.
621 (pushdecl_maybe_friend): Don't set DECL_CONTEXT on a PARM_DECL
622 when we're parsing a function declarator.
624 2008-09-05 Douglas Gregor <doug.gregor@gmail.com>
627 * tree.c (cp_build_qualified_type_real): Deal with sharing of
628 TYPE_LANG_SPECIFIC in the canonical types of pointer-to-method
631 2008-09-04 Ian Lance Taylor <iant@google.com>
633 * parser.c (check_no_duplicate_clause): Change code parameter to
634 enum omp_clause_code.
636 2008-09-03 Jakub Jelinek <jakub@redhat.com>
639 * decl.c (cp_finish_decl): Only set
640 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P if decl is VAR_DECL.
643 * cp-tree.h (defer_mark_used_calls, deferred_mark_used_calls): New
645 * decl2.c (mark_used): If defer_mark_used_calls, push decl into
646 deferred_mark_used_calls vector and exit early.
647 * decl.c (defer_mark_used_calls, deferred_mark_used_calls): New
649 (finish_function): Set defer_mark_used_calls for the duration of the
650 function. Call mark_used on any queued decls.
652 2008-09-02 Jason Merrill <jason@redhat.com>
655 * call.c (build_over_call): Make =delete work with SFINAE.
656 * class.c (resolve_address_of_overloaded_function): Likewise.
658 * cp-tree.h (struct lang_decl_flags): Rename threadprivate_p to
659 threadprivate_or_deleted_p.
660 (CP_DECL_THREADPRIVATE_P): Adjust.
661 (DECL_DELETED_FN): Likewise.
662 (SD_UNINITIALIZED, SD_INITIALIZED, SD_DEFAULTED): New macros.
663 (SD_DELETED): New macro.
664 * parser.c (cp_parser_init_declarator): Use them.
665 * decl.c (start_decl): Use them.
667 * decl2.c (mark_used): Give =deleted error even in sizeof.
669 * typeck2.c (check_narrowing): Downgrade narrowing error to
672 2008-09-02 Aldy Hernandez <aldyh@redhat.com>
674 * typeck.c (build_array_ref): Use new location argument.
675 * class.c (build_vtbl_ref_1): Pass location to build_array_ref.
676 * call.c (build_new_op): Same.
677 * decl2.c (grok_array_decl): Same.
678 * cp-tree.h (build_array_ref): Add location argument to prototype.
680 2008-09-01 Aldy Hernandez <aldyh@redhat.com>
682 * typeck.c (build_x_indirect_ref): Add location argument.
683 * class.c (build_base_path): Pass location to build_indirect_ref.
684 * pt.c (tsubst_copy_and_build): Pass location to
685 finish_label_address_expr.
686 * parser.c (cp_parser_unary_expression): Same.
688 2008-08-31 Jason Merrill <jason@redhat.com>
690 Implement late-specified return type using 'auto'.
691 * cp-tree.h (struct cp_declarator): Add late_return_type field to
693 * parser.c (cp_parser_late_return_type_opt): New fn.
694 (cp_parser_direct_declarator): Use it.
695 (make_call_declarator): Put it in the declarator.
696 * decl.c (grokdeclarator): Splice in late-specified return type.
697 * pt.c (splice_late_return_type): New fn.
699 2008-08-29 Michael Meissner <gnu@the-meissners.org>
701 * decl.c (builtin_function_1): Take a bool argument to decide
702 whether to use pushdecl or pushdecl_top_level.
703 (duplicate_decls): Copy function specific target and optimization
704 options on duplicate declarations.
705 (cxx_builtin_function): Update builtin_function_1 call.
706 (cxx_builtin_function_ext_scope): New function, guarantee that the
707 declaration is done at global scope.
709 * cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE): New
710 macro, define builtin function hook for delayed machine specific
713 * cp-tree.h (cxx_builtin_function_ext_scope): Add declaration.
715 2008-08-30 Jason Merrill <jason@redhat.com>
718 * pt.c (dependent_type_p): Don't abort on auto outside of a template.
720 2008-08-29 Jason Merrill <jason@redhat.com>
722 Implement C++0x 'auto' semantics.
723 * decl.c (start_decl_1): Don't complain about auto being incomplete.
724 (cp_finish_decl): Deduce auto.
725 * init.c (build_new): Handle 'new auto'.
726 * typeck2.c (cxx_incomplete_type_diagnostic): Give a different
727 message for auto than for normal template type parms.
728 * pt.c (type_dependent_expression_p): Handle { }.
729 (make_auto): New function.
730 (listify_autos): New function.
731 (do_auto_deduction): New function.
732 (is_auto): New function.
733 (type_uses_auto): New function.
734 * cp-tree.h: Declare them.
735 * parser.c (cp_parser_decl_specifier_seq): In C++0x mode, don't
736 treat auto as a declspec.
737 (cp_parser_simple_type_specifier): It's a type-specifier.
739 2008-08-29 Mark Mitchell <mark@codesourcery.com>
741 * mangle.c (write_type): Add target-specific manglings for
742 non-fundamental types to the substitution table.
745 2008-08-29 Jakub Jelinek <jakub@redhat.com>
749 * name-lookup.c (do_using_directive, cp_emit_debug_info_for_using):
750 Adjust debug_hooks->imported_module_or_decl callers.
752 2008-08-29 Jan Hubicka <jh@suse.cz>
754 * cp-gimplify.c (cp_gimplify_expr): Add PRED_CONTINUE heuristic.
756 2008-08-28 Paolo Carlini <paolo.carlini@oracle.com>
759 * decl.c (reshape_init_r): Check init for error_mark_node.
761 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
764 * semantics.c (maybe_convert_cond): Call verify_sequence_points.
765 (finish_return_stmt): Likewise.
766 (finish_switch_condition): Likewise.
768 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
770 * cp-tree.h: Fix #error directive.
772 2008-08-26 Douglas Gregor <doug.gregor@gmail.com>
774 * typeck.c (type_after_usual_arithmetic_conversions): Don't do the
775 usual arithmetic conversions on scoped enumeration types.
776 (common_type): Ditto.
777 (default_conversion): Don't perform integral promotions on scoped
779 (build_array_ref): Scoped enumeration types can't be used as
781 * decl.c (start_enum): If building a C++0x scoped enumeration,
782 enter its scope. If provided with an underlying type, check that
783 underlying type and set up the enumeration type accordingly.
784 (finish_enum): Only compute an underlying type if the underlying
785 type isn't already fixed, and only convert the enumerator values
786 now if we've just computed the underlying type. Finish the scope
787 of C++0x scoped enumerations.
788 (build_enumerator): For enumerations with a fixed underlying type,
789 check the enumerator values when the enumerator is defined.
790 (lookup_enumerator): New.
791 * call.c (standard_conversion): Don't allow assignment from
792 integers to scoped enumeration types, even with -fpermissive.
793 Don't convert from scoped enumerations to bool or any arithmetic
795 (build_conditional_expr): Don't per the usual arithmetic
796 conversions for scoped enumeration types.
797 (convert_like_real): Check complain to see if we should
799 * error.c (class_key_or_enum_as_string): Print scoped enums.
800 * cp-tree.h (MAYBE_CLASS_TYPE_P): Check CLASS_TYPE_P, not
802 (INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P): New.
803 (SCOPED_ENUM_P): New.
804 (UNSCOPED_ENUM_P): New.
805 (SET_SCOPED_ENUM_P): New.
806 (ENUM_UNDERLYING_TYPE): New.
807 * pt.c (lookup_template_class): Update the instantiation of enum
808 types to deal with C++0x scoped enumerations and underlying
810 * name-lookup.c (begin_scope): Deal with scoped enumeration
812 (lookup_qualified_name): Deal with lookup into enumeration types.
813 * name-lookup.h (enum scope_kind): Add sk_scoped_enum.
814 * parser.c (cp_parser_class_or_namespace_name): Rename to...
815 (cp_parser_qualifying_entity): ... this. Also, in C++0x mode,
816 parse a type-name that can be an enumeration type.
817 (cp_parser_nested_name_specifier_opt): Update with C++0x grammar.
818 (cp_parser_elaborated_type_specifier): Parse the
819 optional `struct' or `class' following enum (in C++0x).
820 (cp_parser_enum_specifier): Parse C++0x scoped enumerations and
823 2008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
825 * typeck.c: Update all calls to pedwarn.
830 * name-lookup.c: Likewise.
831 * parser.c: Likewise.
833 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
836 * parser.c (cp_parser_omp_for_loop): Handle parenthesized
839 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
841 * parser.c: Update all calls to inform.
842 * typeck.c: Likewise.
846 * method.c: Likewise.
847 * friend.c: Likewise.
848 * typeck2.c: Likewise.
850 * name-lookup.c: Likewise.
853 2008-08-19 Jakub Jelinek <jakub@redhat.com>
856 * error.c (cp_print_error_function): Deal with recursive BLOCK trees.
858 2008-08-18 Tomas Bily <tbily@suse.cz>
860 * tree.c (cp_tree_equal): Use CONVERT_EXPR_CODE_P.
862 2008-08-18 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
864 * typeck.c: Update all callers of permerror.
869 * except.c: Likewise.
871 * typeck2.c: Likewise.
873 * semantics.c: Likewise.
874 * name-lookup.c: Likewise.
877 * parser.c: Likewise.
879 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
882 * pt.c (check_template_shadow): Change to return a bool.
883 * name-lookup.c (push_class_level_binding): Early return if
884 check_template_shadow returns false.
885 * cp-tree.h (check_template_shadow): Adjust declaration.
887 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
890 * decl.c (grokdeclarator): In case of extern and initializer, return
891 error_mark_node after the error.
893 2008-08-13 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
896 * decl.c (grokfndecl): Call check_main_parameters_type only if
899 2008-08-12 Paolo Carlini <paolo.carlini@oracle.com>
902 * parser.c (cp_parser_class_head): Early return error_mark_node in
903 case of global qualification of class name or qualified name that
904 does not name a class.
906 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
909 * cvt.c (ocp_convert): Warn for out-of-range conversions to enum.
911 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
914 * cp-tree.h (struct diagnostic_context, struct diagnostic_info):
915 Delete forward declarations. Check that toplev.h has not been
916 included before this file. Include toplev.h and diagnostic.h.
917 * error.c (cp_cpp_error): Use DK_PEDWARN.
918 (cxx_incomplete_type_diagnostic): Update declaration.
919 (cxx_incomplete_type_error): Use DK_ERROR.
920 * typeck2.c (cxx_incomplete_type_diagnostic): Take a diagnostic_t
921 as argument. Use emit_diagnostic.
922 (cxx_incomplete_type_error): Use DK_ERROR.
923 (add_exception_specifier): Use diagnostic_t instead of custom
925 * typeck.c (complete_type_or_else): Update call to
926 cxx_incomplete_type_diagnostic.
927 * init.c (build_delete): Likewise.
928 * call.c (diagnostic_fn_t): Remove unused typedef.
929 (build_temp): Pass a pointer to diagnostic_t.
930 (convert_like_real): Use emit_diagnostic.
931 (joust): Check return value of warning before giving informative
933 * friend.c (do_friend): Check return value of warning
934 before giving informative note.
935 * parser.c (cp_parser_template_id): Likewise.
937 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
940 * class.c (check_bases_and_members): Warn with -Wuninitialized
943 2008-08-08 Volker Reichelt <v.reichelt@netcologne.de>
946 * decl.c (xref_basetypes): Check base for MAYBE_CLASS_TYPE_P,
947 and make sure it is not a union.
949 2008-08-07 H.J. Lu <hongjiu.lu@intel.com>
951 * semantics.c (finish_decltype_type): Initialize type.
953 2008-08-07 Douglas Gregor <doug.gregor@gmail.com>
955 * semantics.c (finish_decltype_type): Handle calls to function
956 pointers and references to functions properly.
958 2008-08-06 Douglas Gregor <doug.gregor@gmail.com>
961 * parser.c (cp_parser_template_argument): Don't assume that '>>'
962 following a type-id is an error when in C++0x mode.
964 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
967 * decl.c (grokdeclarator): Use explicit location with permerror_at.
969 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
972 * typeck.c (cp_build_binary_op): Move code to c-common.c.
974 2008-08-05 Jason Merrill <jason@redhat.com>
977 * decl.c (build_ptrmemfunc_type): Don't require structural
978 comparison of PMF types.
979 * tree.c (cp_build_qualified_type_real): Don't clear
980 a valid TYPE_PTRMEMFUNC_TYPE.
981 * typeck.c (cp_build_unary_op): Still do build_ptrmemfunc in
984 2008-08-04 Jason Merrill <jason@redhat.com>
987 * typeck2.c (check_narrowing): Allow narrowing conversion
988 from an explicit floating-point constant.
991 * pt.c (tsubst_decl): Leave DECL_INITIAL set on deleted
994 2008-08-04 Simon Baldwin <simonb@google.com>
997 * parser.c (cp_parser_elaborated_type_specifier): Warn only when
998 the declaration's id is followed by a semicolon.
1000 2008-07-31 Jakub Jelinek <jakub@redhat.com>
1003 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Call
1004 complete_type_or_else even for UNKNOWN_TYPE to get diagnostics.
1006 2008-07-31 Jason Merrill <jason@redhat.com>
1009 * init.c (build_new_1): Don't convert pointer to the data type
1010 until we're actually going to treat it as that type.
1013 * tree.c (build_aggr_init_expr): Split out...
1014 (build_cplus_new): ...from here.
1015 (stabilize_init): Don't mess with AGGR_INIT_EXPR either.
1016 * init.c (build_new_1): new T() means value-initialization,
1017 not default-initialization.
1018 (build_vec_init): Likewise.
1019 (build_value_init_1): Use build_aggr_init_expr.
1021 2008-07-30 Dodji Seketeli <dseketel@redhat.com>
1024 * decl2.c (fix_temporary_vars_context_r): New function.
1025 (one_static_initialization_or_destruction): Make sure temporary
1026 variables part of the initialiser have their DECL_CONTEXT()
1029 2008-07-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1032 * typeck.c (build_binary_op): Encapsulate code into
1035 2008-07-29 Jakub Jelinek <jakub@redhat.com>
1038 * tree.c (cplus_array_hash, build_cplus_array_type_1): Hash on
1039 TYPE_UID instead of pointers.
1041 2008-07-29 Jan Hubicka <jh@suse.cz>
1043 * optimize.c (maybe_clone_body): Remove DECL_INLINE.
1044 * decl.c (duplicate_decls): Likewise.
1045 (grokfndecl): Likewise.
1046 (start_method): Likewise.
1047 * method.c (make_thunk, make_alias_for, implicitly_declare_fn):
1049 * pt.c (register_specialization, regenerate_decl_from_template):
1051 * decl2.c (grokfield): Likewise.
1053 2008-07-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1056 * decl.c (duplicate_decls): Merge USED flags.
1058 2008-07-27 Jason Merrill <jason@redhat.com>
1061 * decl.c (reshape_init_r): Allow C++0x initializer lists.
1063 2008-07-28 Richard Guenther <rguenther@suse.de>
1065 Merge from gimple-tuples-branch.
1067 2008-07-22 Aldy Hernandez <aldyh@redhat.com>
1069 * cp-gimplify.c (gimplify_if_stmt): Set location on newly created
1072 2008-07-18 Jakub Jelinek <jakub@redhat.com>
1074 * decl.c (finish_function): Call gimple_body after cp_genericize.
1076 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
1078 * optimize.c: Include gimple.h instead of tree-gimple.h.
1079 * Make-lang.in (cp-gimplify.o): Depend on tree-iterator.h.
1080 * cp-gimplify.c: Rename tree-gimple.h to gimple.h. Include
1083 2008-07-16 Jakub Jelinek <jakub@redhat.com>
1085 * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE for the clone.
1087 2008-07-14 Jakub Jelinek <jakub@redhat.com>
1089 * cp-gimplify.c (cp_gimplify_expr): Update comment.
1091 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
1093 * cp-tree.h (union lang_tree_node): Rename GENERIC_NEXT to
1095 * cp-gimplify.c (cxx_omp_clause_apply_fn): Rename
1096 GIMPLE_MODIFY_STMT to MODIFY_EXPR.
1097 (cxx_omp_clause_copy_ctor): Same.
1098 (cxx_omp_clause_assign_op): Same.
1100 2008-05-28 Jakub Jelinek <jakub@redhat.com>
1102 * cp-gimplify.c (cp_gimplify_omp_for): Add pre_p argument. Tuplify.
1103 (cp_gimplify_expr): Adjust caller.
1105 2008-05-11 Doug Kwan <dougkwan@google.com>
1107 * init.c (build_vec_delete): Add type conversion for argument
1108 0 of POINTER_PLUS_EXPR.
1110 2008-04-29 Doug Kwan <dougkwan@google.com>
1112 * decl2 (File): Include "gimple.h"
1113 (cp_write_global_declarations): Use gimple_body instead of
1115 * Make-lang.in (cp/decl2.o): Add $(GIMPLE_H)
1117 2008-04-10 Diego Novillo <dnovillo@google.com>
1119 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00913.html
1121 * optimize.c (maybe_clone_body): Re-enable call to
1123 * cp-gimplify.c (cp_gimplify_omp_for): Mark disabled
1124 code with call to gimple_unreachable.
1125 (cp_genericize): Fix handling of clone bodies.
1127 2008-04-04 Diego Novillo <dnovillo@google.com>
1129 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00413.html
1131 * optimize.c (maybe_clone_body): Re-enable.
1133 2008-02-19 Diego Novillo <dnovillo@google.com>
1134 Oleg Ryjkov <olegr@google.com>
1136 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
1138 * cp-gimplify.c (gimplify_for_stmt): Change gimple_seq
1139 argument to gimple_seq *. Update all users.
1140 (gimplify_must_not_throw_expr): Likewise.
1142 2008-02-04 Oleg Ryjkov <olegr@google.com>
1144 * except.c: Include gimple.h
1145 (cp_protect_cleanup_actions): Convert to tuples.
1146 * Make-lang.in (cp/except.o): Add dependency on gimple.h
1148 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
1150 * cp-gimplify.c (gimplify_cp_loop): Call tree_annotate_all_with_locus
1151 instead of annotating each block manually.
1153 2007-10-30 Aldy Hernandez <aldyh@redhat.com>
1155 * cp-gimplify.c (gimplify_cp_loop): Tuplify.
1156 (gimplify_for_stmt): Same.
1157 (gimplify_switch_stmt): Same.
1158 (cp_gimplify_expr): [FOR_STMT]: Do not call gimplify_for_stmt. Return
1160 [WHILE_STMT]: Return GS_OK.
1161 [SWITCH_STMT]: Same.
1162 [CONTINUE_STMT]: Same.
1164 (cp_genericize): Set gimple_body() of cloned functions when needed.
1166 2007-10-29 Aldy Hernandez <aldy@quesejoda.com>
1168 * cp-gimplify.c: Move build_gimple_eh_filter_tree here.
1169 (cp_gimplify_init_expr): Convert to tuples.
1170 (gimplify_must_not_throw_expr): Make function return a
1171 gimplify_status and convert to tuples.
1173 2007-10-18 Aldy Hernandez <aldy@quesejoda.com>
1175 * cp-gimplify.c (genericize_try_block): Enable and do not call
1177 (genericize_catch_block): Same.
1178 (genericize_eh_spec_block): Same.
1179 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
1180 (cp_gimplify_expr): Enable TRY_BLOCK, HANDLER, and EH_SPEC_BLOCK.
1182 2007-10-16 Aldy Hernandez <aldy@quesejoda.com>
1184 * optimize.c (maybe_clone_body): Comment out call to clone_body.
1185 * decl.c (finish_function): Use gimple_body instead of
1187 * cp-tree.h (cp_gimplify_expr): Last 2 arguments are sequences.
1188 * cp-gimplify.c (genericize_try_block): Comment out.
1189 (genericize_catch_block): Same.
1190 (genericize_eh_spec_block): Same.
1191 (gimplify_cp_loop): Comment out calls to gimplify_stmt.
1192 (gimplify_for_stmt): Comment out.
1193 (gimplify_switch_stmt): Comment out call to gimplify_stmt.
1194 (cp_gimplify_omp_for): Same.
1195 (gimplify_must_not_throw_expr): Argument pre_p is a sequence.
1196 Comment out call to gimplify_stmt and append_to_statement_list.
1197 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
1198 (cp_gimplify_init_expr): Arguments pre_p and post_p are sequences.
1199 (cp_gimplify_expr): Same.
1200 Comment out calls to genericize_*_block. Comment out call to
1203 2008-07-27 H.J. Lu <hongjiu.lu@intel.com>
1206 * class.c (type_has_user_provided_default_constructor): Handle
1209 2008-07-27 Paolo Carlini <paolo.carlini@oracle.com>
1211 * decl.c (push_library_fn): Add a parameter for the exceptions that
1212 the function may throw.
1213 (push_void_library_fn, push_throw_library_fn, expand_static_init):
1215 (build_library_fn): Change to static.
1216 * cp-tree.h: Adjust declarations.
1217 * except.c (declare_nothrow_library_fn): New.
1218 (do_get_exception_ptr, do_begin_catch, do_free_exception,
1219 do_allocate_exception): Use the latter, adjust the declarations
1220 (ie, add empty exception-specification), consistently with the
1221 actual implementation in libsupc++.
1223 2008-07-25 Jan Hubicka <jh@suse.cz>
1225 * typeck.c (inline_conversion): Remove.
1226 (cp_build_function_call): Do not use inline_conversion.
1227 * decl.c (duplicate_decls): Do not insist on inline being declared
1229 (start_cleanup_fn): Do not assume that INLINE flags prevent function
1230 from being output. We now remove static functions always.
1231 (finish_function): Do return warning on all static functions.
1232 * call.c (build_over_call): Do not use inline_conversion.
1233 * cp-tree.h (possibly_inlined_p): Declare.
1234 (inline_conversion): Remove.
1235 * pt.c (instantiate_decl): Use possibly_inlined_p predicate.
1236 * decl2.c (cp_write_global_declarations): Likewise.
1237 (mark_used): Likewise.
1238 (possibly_inlined_p): New functions.
1240 2008-07-25 Jason Merrill <jason@redhat.com>
1242 * class.c (type_has_user_provided_default_constructor): Handle
1245 2008-07-23 Jan Hubicka <jh@suse.cz>
1247 * decl.c (duplicate_decls): Update comment and unit-at-a-time.
1248 (grogfndecl): Drop flag_inline_trees code.
1249 * pt.c (instantiate_decl): Drop flag_iline_trees code.
1250 * lex.c (cxx_init): Do not set unit-at-a-time.
1252 2008-07-23 Jason Merrill <jason@redhat.com>
1254 * mangle.c (write_unqualified_name): Avoid infinite recursion when
1255 trying to mangle a decl with no name.
1257 Implement defaulted/deleted functions as per N2346
1258 * cp-tree.h (struct lang_decl_flags): Add defaulted_p bitfield.
1259 (DECL_DELETED_FN): New macro.
1260 (DECL_DEFAULTED_FN): New macro.
1261 * class.c (user_provided_p): New fn.
1262 (defaultable_fn_p): New fn.
1263 (type_has_user_provided_constructor): New fn.
1264 (type_has_user_provided_default_constructor): New fn.
1265 (check_methods): A defaulted fn is still trivial.
1266 (check_bases_and_members): Likewise.
1267 * decl.c (grok_special_member_properties): Likewise.
1268 (duplicate_decls): Complain about redeclaring a function as deleted.
1269 (start_decl): initialized==2 means deleted.
1270 (cp_finish_decl): Handle deleted/defaulted semantics.
1271 * decl2.c (grokfield): Likewise.
1272 (mark_used): Check DECL_DEFAULTED_FN instead of DECL_ARTIFICIAL.
1273 Complain about using a deleted fn.
1274 * init.c (build_value_init_1): Use type_has_user_provided_constructor.
1275 (perform_member_init): Check for a user-provided default constructor
1276 even if TYPE_NEEDS_CONSTRUCTING.
1277 (build_new_1): Likewise.
1278 * call.c (build_over_call): Don't call mark_used twice.
1279 * method.c (implicitly_declare_fn): Set DECL_DEFAULTED_FN.
1280 * search.c (check_final_overrider): Check for deleted mismatch.
1281 * parser.c (cp_parser_init_declarator): Tell start_decl about =delete.
1282 (cp_parser_pure_specifier): Handle =default and =delete.
1284 * error.c (maybe_warn_cpp0x): Suggest -std=gnu++0x as well.
1286 2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1289 * typeck.c: All calls to pedwarn changed.
1290 * decl.c: All calls to pedwarn changed.
1291 * call.c: All calls to pedwarn changed.
1292 * error.c: All calls to pedwarn changed.
1293 * typeck2.c: All calls to pedwarn changed.
1294 * pt.c: All calls to pedwarn changed.
1295 * name-lookup.c: All calls to pedwarn changed.
1296 * parser.c: All calls to pedwarn changed.
1298 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1300 * call.c: Fix comment typos.
1301 * class.c: Likewise.
1302 * cp-tree.h: Likewise.
1303 * cxx-pretty-print.c: Likewise.
1306 * name-lookup.c: Likewise.
1307 * operators.def: Likewise.
1308 * parser.c: Likewise.
1311 * typeck.c: Likewise.
1313 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
1317 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Only check
1318 copy constructors and copy assignment operators proper.
1320 2008-07-21 Rafael Ávila de Espíndola <espindola@google.com>
1322 * parser.c (cp_token): Remove in_system_header.
1323 (eof_token): Remove in_system_header.
1324 (cp_lexer_get_preprocessor_token): Don't set in_system_header.
1325 (cp_lexer_set_source_position_from_token): Don't set in_system_header.
1326 (cp_parser_member_declaration): Use in_system_header_at.
1327 * pt.c (lookup_template_class): Don't set DECL_IN_SYSTEM_HEADER.
1328 (pop_tinst_level): Don't set in_system_header.
1329 (instantiate_class_template): Don't set in_system_header.
1330 (instantiate_decl): Don't set in_system_header.
1331 (instantiate_pending_templates): Don't set in_system_header.
1333 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
1336 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Use
1337 TYPE_NOTHROW_P, not TREE_NOTHROW.
1338 (trait_expr_value): Likewise.
1340 2008-07-18 Dodji Seketeli <dseketel@redhat.com>
1343 * call.c (convert_like_real): Don't take the error code path
1344 when a rvalue or base conversion has the bad_p field set.
1346 2008-07-18 Kris Van Hees <kris.van.hees@oracle.com>
1348 * rtti.c (emit_support_tinfos): Add char16_type_node and
1350 * typeck2.c (digest_init): Support char16_t and char32_t.
1352 2008-07-18 Kavih R. Ghazi <ghazi@caip.rutgers.edu>
1354 * cvt.c (convert_to_void): Avoid C++ keywords.
1355 * decl.c (walk_namespaces_r, wrapup_globals_for_namespace):
1357 * friend.c (is_friend): Likewise.
1358 * init.c (perform_member_init): Likewise.
1359 * mangle.c (write_template_prefix, write_template_template_param):
1361 * name-lookup.c (do_namespace_alias, do_using_directive,
1362 parse_using_directive, ambiguous_decl, arg_assoc): Likewise.
1363 * parser.c (cp_parser_template_id, cp_parser_namespace_definition,
1364 cp_parser_objc_typename, cp_parser_objc_method_keyword_params):
1366 * pt.c (is_specialization_of_friend, lookup_template_class,
1367 push_tinst_level, instantiate_class_template,
1368 tsubst_copy_and_build): Likewise.
1369 * tree.c (add_stmt_to_compound): Likewise.
1370 * typeck.c (finish_class_member_access_expr): Likewise.
1372 2008-07-17 Julian Brown <julian@codesourcery.com>
1373 Mark Mitchell <mark@codesourcery.com>
1375 * decl2.c (determine_visibility): Allow target to override
1376 visibility of class data.
1378 2008-07-17 Paolo Carlini <paolo.carlini@oracle.com>
1381 * semantics.c (trait_expr_value): Update __has_trivial_destructor
1382 semantics to the current WP (N2691).
1384 2008-07-16 Dodji Seketeli <dseketel@redhat.com>
1387 * name-lookup.c (lookup_extern_c_fun_binding_in_all_ns): New function.
1388 (pushdecl_maybe_friend): Check if a redeclaration of extern C function
1389 complies with exception specification constraints.
1391 2008-07-14 Jason Merrill <jason@redhat.com>
1393 * lex.c (init_reswords): Always set D_OBJC.
1395 2008-07-11 Tom Tromey <tromey@redhat.com>
1396 Ian Lance Taylor <iant@google.com>
1398 * lex.c (struct resword, reswords): Don't define.
1399 (D_EXT, D_ASM, D_OBJC, D_CXX0X): Don't define.
1400 (init_reswords): Clarify mask code. Use c_common_reswords rather
1403 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1406 * decl.c (grokdeclarator): Warn about initializing variables
1407 of storage class 'extern' only after the type of the declarator
1408 has been properly computed.
1410 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1413 * cp-tree.h (struct cp_decl_specifier_seq): Add a location field. It
1414 carries the location of the primary type.
1415 * parser.c (cp_parser_check_type_definition): Update documentation.
1416 (cp_parser_check_for_definition_in_return_type,
1417 cp_parser_check_for_invalid_template_id,
1418 cp_parser_set_decl_spec_type,
1419 cp_parser_check_for_definition_in_return_type,
1420 cp_parser_diagnose_invalid_type_name,
1421 cp_parser_new_expression, cp_parser_explicit_instantiation,
1422 cp_parser_type_specifier, cp_parser_simple_type_specifier,
1423 cp_parser_omp_for_loop, cp_parser_pragma): Use location in error
1426 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1430 * semantic.c (qualified_name_lookup_error, finish_id_expression):
1431 Add a location_t parameter so that
1432 error message can have a more accurate location.
1433 * cp-tree.h: Updated prototype
1434 * pt.c (tsubst_qualified_id): Use location in error messages.
1435 * parser.c (cp_parser_postfix_expression,
1436 cp_parser_objc_statement, cp_parser_trait_expr,
1437 cp_parser_token_is_class_key,
1438 cp_parser_uncommitted_to_tentative_parse_p,
1439 cp_parser_check_for_invalid_template_id, cp_parser_is_string_literal,
1440 cp_parser_error, cp_parser_name_lookup_error,
1441 cp_parser_simulate_error, cp_parser_check_decl_spec,
1442 cp_parser_check_decl_spec, cp_parser_non_integral_constant_expression,
1443 cp_parser_diagnose_invalid_type_name,
1444 cp_parser_parse_and_diagnose_invalid_type_name,
1445 cp_parser_require_pragma_eol, cp_parser_make_typename_type,
1446 cp_parser_string_literal, cp_parser_primary_expression,
1447 cp_parser_primary_expression, cp_parser_unqualified_id,
1448 cp_parser_nested_name_specifier_opt, cp_parser_postfix_expression,
1449 cp_parser_postfix_dot_deref_expression, cp_parser_new_expression,
1450 cp_parser_direct_new_declarator, cp_parser_builtin_offsetof,
1451 cp_parser_label_for_labeled_statement, cp_parser_statement_seq_opt,
1452 cp_parser_jump_statement, cp_parser_block_declaration,
1453 cp_parser_simple_declaration, cp_parser_decl_specifier_seq,
1454 cp_parser_function_specifier_opt, cp_parser_decltype,
1455 cp_parser_mem_initializer_list, cp_parser_mem_initializer,
1456 cp_parser_mem_initializer_id, cp_parser_template_parameter,
1457 cp_parser_type_parameter, cp_parser_template_id,
1458 cp_parser_template_name, cp_parser_template_argument): Likewise.
1460 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1463 * pt.c (tsubst_function_type): Remove warning for type qualifiers
1464 on function return type.
1466 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1469 * pt.c (tsubst_function_type): Don't warn for type qualifiers
1470 on function return type in case of system header.
1472 2008-07-09 Raksit Ashok <raksit@google.com>
1474 * parser.c (cp_parser_postfix_expression): New warning based on flag
1475 warn_disallowed_functions.
1477 2008-07-08 Simon Martin <simartin@users.sourceforge.net>
1480 * decl.c (grokdeclarator): Reset storage_class and staticp for friend
1481 functions declared with a storage class qualifier.
1483 2008-07-03 Richard Guenther <rguenther@suse.de>
1486 * typeck.c (cp_build_function_call): Move code to verify
1487 builtin function arguments ...
1488 * call.c (build_cxx_call): ... here.
1490 2008-07-02 Jason Merrill <jason@redhat.com>
1492 * Make-lang.in (cp/typeck2.o): Add $(REAL_H) dependency.
1494 Implement WG21 N2672, Initializer List proposed wording
1495 * cp-tree.h (enum cp_tree_index): Add CPTI_INIT_LIST_TYPE.
1496 (struct lang_type_class): Add has_list_ctor bitfield.
1497 (TYPE_HAS_LIST_CTOR): New macro.
1498 (BRACE_ENCLOSED_INITIALIZER_P): Expect init_list_type_node.
1499 (CONSTRUCTOR_IS_DIRECT_INIT): New macro.
1500 (LOOKUP_NO_NARROWING): New macro.
1501 (LOOKUP_NO_COPY_CTOR_CONVERSION): New macro.
1502 * parser.c (cp_parse_braced_list): Split out from...
1503 (cp_parser_initializer_clause): ...here.
1504 (cp_parser_postfix_expression): Build up CONSTRUCTOR for compound
1506 (cp_lexer_next_token_is_not_keyword): New fn.
1507 (cp_parser_parenthesized_expression_list): Handle { }.
1508 (cp_parser_new_expression, cp_parser_new_initializer): Likewise.
1509 (cp_parser_assignment_expression, cp_parser_condition): Likewise.
1510 (cp_parser_jump_statement, cp_parser_simple_declaration): Likewise.
1511 (cp_parser_mem_initializer, cp_parser_init_declarator): Likewise.
1512 (cp_parser_initializer, cp_parser_functional_cast): Likewise.
1513 (cp_parser_omp_for_loop, cp_parser_cache_group): Likewise.
1514 (cp_parser_save_member_function_body): Likewise.
1515 * call.c (conversion_kind): Add ck_list, ck_aggr.
1516 (struct conversion): Add check_narrowing bitfield, conversion list.
1517 (build_list_conv): New fn.
1518 (build_aggr_conv): New fn.
1519 (implicit_conversion): Call them.
1520 (standard_conversion): Set check_narrowing if appropriate.
1521 (add_function_candidate): Handle LOOKUP_NO_COPY_CTOR_CONVERSION.
1522 (build_user_type_conversion_1): When converting from an init list,
1523 we allow additional conversions except when calling a copy ctor.
1524 (convert_like_real): Calling an explicit ctor for an init list is
1525 ill-formed. Handle ck_list and ck_addr. Check narrowing.
1526 (build_new_method_call): If CONSTRUCTOR_IS_DIRECT_INIT is set and
1527 class doesn't have a list ctor, break the {} into a TREE_LIST.
1528 (compare_ics): ck_list is better than other UDCs.
1529 (set_up_extended_ref_temp): Split out from initialize_reference.
1530 (is_std_init_list): New fn.
1531 (is_list_ctor): New fn.
1532 * decl.c (cxx_init_decl_processing): Create init_list_type_node.
1533 (reshape_init_array_1): Pass it to build_constructor.
1534 (reshape_init_class): Ditto.
1535 (initialize_artificial_var): Pass the appropriate type.
1536 (build_aggr_init_full_exprs): Split out from...
1537 (check_initializer): ...here. Handle new semantics.
1538 (build_init_list_var_init): New subroutine of check_initializer.
1539 (grokdeclarator): Converting constructors can have more than one parm.
1540 (grok_special_member_properties): Set TYPE_HAS_LIST_CTOR.
1541 * init.c (expand_default_init): Only do digest_init for aggregates.
1542 * rtti.c (tinfo_base_init): Pass init_list_type_node to
1543 build_constructor_from_list.
1544 (generic_initializer, ptr_initializer): Ditto.
1545 (ptm_initializer, class_initializer): Ditto.
1546 (get_pseudo_ti_init): Ditto.
1547 * error.c (dump_type): Handle init_list_type_node.
1548 (maybe_warn_cpp0x): New fn.
1549 (maybe_varn_variadic_templates): Call it.
1550 * cvt.c (ocp_convert): Handle conversion from { }.
1551 * tree.c (build_array_of_n_type): New fn.
1552 * typeck2.c (store_init_value): Use init_list_type_node.
1553 (digest_init): Likewise.
1554 (check_narrowing): New fn.
1555 * semantics.c: (finish_compound_literal): Take CONSTRUCTOR instead
1556 of vector of constructor elts. Handle non-aggregate types. Make
1557 constant literals static.
1558 * pt.c: (tsubst_copy_and_build): Adjust.
1559 (unify): Handle { }.
1560 * name-lookup.c (arg_assoc_type): Handle init_list_type_node.
1562 2008-07-01 Daniel Jacobowitz <dan@codesourcery.com>
1564 * typeck.c (comp_ptr_ttypes_real): Use vector_targets_convertible_p.
1565 (comp_ptr_ttypes_const): Likewise.
1567 2008-07-01 Andrew Haley <aph@redhat.com>
1569 * decl.c (finish_constructor_body): Don't set the return value of
1570 the constructor if the constructor is that of a Java type.
1572 2008-06-30 Jakub Jelinek <jakub@redhat.com>
1575 * decl2.c (is_late_template_attribute): If the first attribute
1576 argument is IDENTIFIER_NODE, don't consider it when checking
1577 if arguments are value or type dependent.
1579 2008-06-29 Paolo Carlini <paolo.carlini@oracle.com>
1582 * pt.c (do_type_instantiation): In c++0x mode do not warn for
1585 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1587 * Make-lang.in (cp-warn): Delete $(CXX_COMPAT_WARN).
1589 2008-06-28 Jakub Jelinek <jakub@redhat.com>
1592 * repo.c (repo_emit_p): Put const static data members initialized
1593 by const expr into *.rpo file, just return 2 if IDENTIFIER_REPO_CHOSEN
1596 2008-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1599 * pt.c (do_decl_instantiation): In c++0x mode do not warn for
1602 2008-06-24 Jonathan Wakely <jwakely.gcc@gmail.com>
1605 * typeck.c (cp_build_function_call): Show example syntax in
1608 2008-06-21 Jonathan Wakely <jwakely.gcc@gmail.com>
1610 * typeck.c (composite_pointer_type_r, cxx_sizeof_expr,
1611 cxx_alignof_expr, check_template_keyword, cp_build_binary_op,
1612 pointer_diff, cp_build_unary_op, build_x_compound_expr_from_list,
1613 build_reinterpret_cast_1, cp_build_c_cast, check_return_expr): Change
1614 pedwarn to permerror.
1615 * init.c (perform_member_init, build_new_1, build_new): Likewise.
1616 * decl.c (warn_extern_redeclared_static, duplicate_decls,
1617 * identify_goto, check_previous_goto_1, check_goto, define_label,
1618 check_tag_decl, start_decl, check_class_member_definition_namespace,
1619 grokfndecl, grokdeclarator): Likewise.
1620 * except.c (check_handlers): Likewise.
1621 * typeck2.c (digest_init): Likewise.
1622 * pt.c (check_specialization_namespace,
1623 check_explicit_instantiation_namespace,
1624 maybe_process_partial_specialization, check_explicit_specialization,
1625 convert_template_argument, do_decl_instantiation,
1626 do_type_instantiation, instantiate_decl): Likewise.
1627 * semantics.c (finish_template_type_parm): Likewise.
1628 * name-lookup.c (pushdecl_maybe_friend,
1629 check_for_out_of_scope_variable): Likewise.
1630 * decl2.c (finish_static_data_member_decl, build_anon_union_vars,
1631 coerce_new_type): Likewise.
1632 * parser.c (cp_parser_nested_name_specifier_opt,
1633 cp_parser_mem_initializer, cp_parser_elaborated_type_specifier,
1634 cp_parser_class_head, cp_parser_check_class_key): Likewise.
1635 (cp_parser_parameter_declaration): Check flag_permissive instead of
1636 flag_pedantic_errors.
1637 * call.c (joust): Change pedwarn to warning.
1638 * friend.c (make_friend_class): Likewise.
1640 2008-06-16 Jan Hubicka <jh@suse.cz>
1642 * method.c: Include cgraph.h.
1643 (use_thunk): Use cgraph_add_new_function instead of calling backend
1646 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1648 * parser.c: Fix comment typo.
1650 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1653 * decl2.c (grokbitfield): Receive the list of attributes, pass it to
1654 grokdeclarator and apply it to the created declaration.
1655 * cp-tree.h (grokbitfield): Update prototype.
1656 * parser.c (cp_parser_member_declaration): Don't apply the attributes
1657 since they are now applied in grokbitfield. Adjusted the call to
1659 (cp_parser_objc_class_ivars): Likewise.
1661 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1664 * class.c (type_requires_array_cookie): Do not consider delete[]
1665 operators with an ellipsis as second argument.
1667 2008-06-09 Jakub Jelinek <jakub@redhat.com>
1670 * semantics.c (stmt_expr_value_expr): Don't crash on empty
1673 2008-06-08 Paolo Carlini <paolo.carlini@oracle.com>
1676 * pt.c (maybe_process_partial_specialization): Check the tree
1677 returned by push_template_decl for error_mark_node.
1678 * parser.c (cp_parser_class_head): Likewise, check the tree
1679 returned by the latter.
1681 2008-06-07 Paolo Carlini <paolo.carlini@oracle.com>
1684 * decl.c (grokdeclarator): In case of wrong return type return
1685 immediately error_mark_node.
1687 2008-06-06 Jakub Jelinek <jakub@redhat.com>
1689 * cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
1690 dependent_omp_for_p, begin_omp_task, finish_omp_task,
1691 finish_omp_taskwait): New prototypes.
1692 (cxx_omp_clause_default_ctor): Add outer argument.
1693 (finish_omp_for): Add new clauses argument.
1694 * cp-gimplify.c (cxx_omp_finish_clause): New function.
1695 (cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten.
1696 (cxx_omp_clause_default_ctor): Add outer argument.
1697 (cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
1698 * cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
1699 * parser.c (cp_parser_omp_for_loop): Parse collapsed for loops.
1700 Add par_clauses argument. If decl is present in parallel's
1701 lastprivate clause, change that clause to shared and add
1702 a lastprivate clause for decl to OMP_FOR_CLAUSES.
1703 Fix wording of error messages. Adjust finish_omp_for caller.
1704 Add clauses argument. Parse loops with random access iterators.
1705 (cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New
1707 (cp_parser_omp_for, cp_parser_omp_parallel): Adjust
1708 cp_parser_omp_for_loop callers.
1709 (cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper
1711 (cp_parser_omp_clause_name): Handle collapse and untied
1713 (cp_parser_omp_clause_schedule): Handle auto schedule.
1714 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
1715 and PRAGMA_OMP_CLAUSE_UNTIED.
1716 (OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE.
1717 (OMP_TASK_CLAUSE_MASK): Define.
1718 (cp_parser_omp_task, cp_parser_omp_taskwait): New functions.
1719 (cp_parser_omp_construct): Handle PRAGMA_OMP_TASK.
1720 (cp_parser_pragma): Handle PRAGMA_OMP_TASK and
1721 PRAGMA_OMP_TASKWAIT.
1722 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
1723 OMP_CLAUSE_UNTIED. Handle OMP_CLAUSE_LASTPRIVATE_STMT.
1724 (tsubst_omp_for_iterator): New function.
1725 (dependent_omp_for_p): New function.
1726 (tsubst_expr) <case OMP_FOR>: Use it. Handle collapsed OMP_FOR
1727 loops. Adjust finish_omp_for caller. Handle loops with random
1728 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR} changes.
1729 (tsubst_expr): Handle OMP_TASK.
1730 * semantics.c (cxx_omp_create_clause_info): New function.
1731 (finish_omp_clauses): Call it. Handle OMP_CLAUSE_UNTIED and
1732 OMP_CLAUSE_COLLAPSE.
1733 (cxx_omp_predetermined_sharing): Removed.
1734 * semantics.c (finish_omp_for): Allow pointer iterators. Use
1735 handle_omp_for_class_iterator and dependent_omp_for_p. Handle
1736 collapsed for loops. Adjust c_finish_omp_for caller. Add new
1737 clauses argument. Fix check for type dependent cond or incr.
1738 Set OMP_FOR_CLAUSES to clauses. Use cp_convert instead of
1739 fold_convert to convert incr amount to difference_type. Only
1740 fold if not in template. If decl is mentioned in lastprivate
1741 clause, set OMP_CLAUSE_LASTPRIVATE_STMT. Handle loops with random
1742 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR}
1744 (finish_omp_threadprivate): Allow static class members of the
1746 (handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
1747 finish_omp_taskwait): New functions.
1749 * parser.c (cp_parser_binary_expression): Add prec argument.
1750 (cp_parser_assignment_expression): Adjust caller.
1751 * cp-tree.h (outer_curly_brace_block): New prototype.
1752 * decl.c (outer_curly_brace_block): No longer static.
1754 2008-06-02 Paolo Carlini <paolo.carlini@oracle.com>
1757 * pt.c (push_template_decl_real): Consistently return error_mark_node
1760 2008-06-02 Tomas Bily <tbily@suse.cz>
1762 * typeck.c (is_bitfield_expr_with_lowered_type): Use CASE_CONVERT.
1763 (cp_build_unary_op): Likewise.
1764 (cp_build_indirect_ref): Use CONVERT_EXPR_P.
1765 (maybe_warn_about_returning_address_of_local): Likewise.
1767 2008-05-29 Paolo Carlini <paolo.carlini@oracle.com>
1770 * pt.c (tsubst_initializer_list): Consistently check the tree
1771 returned by tsubst_pack_expansion for error_mark_node.
1773 2008-05-27 Michael Matz <matz@suse.de>
1776 * call.c (build_new_op): Make warning conditional on
1779 2008-05-27 Alexandre Oliva <aoliva@redhat.com>
1782 * call.c (convert_like_real): Convert bitfield to desired type
1783 before creating temporary.
1785 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
1787 * Makefile.in: Adjusted dependencies on c-incpath.o.
1789 2008-05-23 Jakub Jelinek <jakub@redhat.com>
1792 * cp-gimplify.c (cxx_omp_clause_apply_fn): Call
1793 fold_build_cleanup_point_expr on build_call_a results.
1796 * semantics.c (omp_clause_info_fndecl): New function.
1797 (finish_omp_clauses): Use it.
1799 2008-05-21 Jakub Jelinek <jakub@redhat.com>
1802 * cp-tree.h (check_array_initializer): New prototype.
1803 * decl.c (check_array_initializer): New function.
1804 (check_initializer): Call it.
1805 * semantics.c (finish_compound_literal): Call it for ARRAY_TYPEs.
1807 2008-05-21 Tom Tromey <tromey@redhat.com>
1809 * mangle.c (save_partially_mangled_name): Remove.
1810 (restore_partially_mangled_name): Likewise.
1811 (write_encoding): Update.
1812 (write_unqualified_name): Likewise.
1813 (start_mangling): Always use name_obstack. Remove 'ident_p'
1815 (get_identifier_nocopy): Remove.
1816 (finish_mangling_internal): Rename from finish_mangling.
1817 (finish_mangling): New function.
1818 (finish_mangling_get_identifier): Likewise.
1819 (partially_mangled_name, partially_mangled_name_len): Remove.
1820 (mangle_decl_string): Change return type. Update.
1821 (mangle_decl, mangle_type_string, mangle_special_for_type,
1822 mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable,
1823 mangle_ref_init_variable): Update.
1825 2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
1828 * semantics.c (begin_class_definition): Extend checks on the first
1831 2008-05-12 Tomas Bily <tbily@suse.cz>
1833 * typeck2.c (digest_init): Use CONVERT_EXPR_P.
1834 * call.c (build_over_call): Likewise.
1835 * error.c (dump_expr): Use CASE_CONVERT.
1836 * class.c (fixed_type_or_null): Likewise.
1838 2008-05-11 Volker Reichelt <v.reichelt@netcologne.de>
1840 * parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
1842 (cp_parser_omp_clause_schedule): Remove superfluous "expected"
1845 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
1847 * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
1848 DECL_LOOPING_CONST_OR_PURE_P attributes.
1849 * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
1852 2008-05-02 Simon Baldwin <simonb@google.com>
1855 * typeck.c (build_array_ref): Remove warn_array_subscript_range.
1857 2008-05-01 Simon Baldwin <simonb@google.com>
1859 * typeck.c (build_array_ref): Call warn_array_subscript_range.
1861 2008-04-30 Jakub Jelinek <jakub@redhat.com>
1864 * pt.c (more_specialized_fn): Stop the loop even if there are no
1865 arguments before ellipsis.
1867 2008-04-29 Jakub Jelinek <jakub@redhat.com>
1870 * parser.c (cp_parser_lookup_name): Look through single function
1874 * typeck.c (cp_build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
1875 COMPOUND_EXPR if the second argument would be error_mark_node.
1877 2008-04-28 Jason Merrill <jason@redhat.com>
1878 Liu Guanwei <liu_gw@163.com>
1881 * parser.c (cp_parser_parameter_declaration): Handle < ambiguity
1882 in default arguments.
1884 2008-04-25 Jan Hubicka <jh@suse.cz>
1886 * typeck.c (check_return_expr): Update.
1887 * decl.c (start_preparsed_function): Update.
1888 * method.c (use_thunk): Update.
1890 2008-04-24 Jakub Jelinek <jakub@redhat.com>
1893 * cp-tree.h (cp_reconstruct_complex_type): New prototype.
1894 * cp-objcp-common.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
1895 * decl2.c (is_late_template_attribute): Only make vector_size
1896 late tmpl attribute if argument is type or value dependent.
1897 (cp_reconstruct_complex_type): New function.
1899 2008-04-24 Richard Guenther <rguenther@suse.de>
1901 * typeck.c (cp_build_function_call): Call
1902 check_builtin_function_arguments.
1904 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1906 * typeck.c (get_member_function_from_ptrfunc): Don't set TREE_INVARIANT.
1907 (build_ptrmemfunc1): Don't set TREE_INVARIANT.
1908 * init.c (build_zero_init): Don't set TREE_INVARIANT.
1909 * class.c (build_base_path): Don't set TREE_INVARIANT.
1910 (build_vtbl_ref_1): Don't set TREE_INVARIANT.
1911 (build_vtbl_initializer): Don't set TREE_INVARIANT.
1912 * decl.c (build_enumerator): Don't set TREE_INVARIANT.
1913 * rtti.c (tinfo_base_init): Don't set TREE_INVARIANT.
1914 (generic_initializer): Don't set TREE_INVARIANT.
1915 (ptr_initializer): Don't set TREE_INVARIANT.
1916 (ptm_initializer): Don't set TREE_INVARIANT.
1917 (class_initializer): Don't set TREE_INVARIANT.
1918 * typeck2.c (process_init_constructor): Don't set TREE_INVARIANT.
1919 * pt.c (push_inline_template_parms_recursive): Don't set TREE_INVARIANT.
1920 (build_template_parm_index): Don't set TREE_INVARIANT.
1921 (reduce_template_parm_level): Don't set TREE_INVARIANT.
1922 (process_template_parm): Don't set TREE_INVARIANT.
1924 2008-04-22 Jason Merrill <jason@redhat.com>
1927 * semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
1928 to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
1929 * typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
1931 2008-04-22 Jakub Jelinek <jakub@redhat.com>
1934 * semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
1935 expression is errorneous.
1937 2008-04-21 Jason Merrill <jason@redhat.com>
1940 * tree.c (cp_tree_equal): Handle FIXED_CST.
1943 * pt.c (template_template_parm_bindings_ok_p): Set
1944 processing_template_decl while in this function.
1946 2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
1948 * cvt.c (type_promotes_to): Support char16_t and char32_t.
1949 * decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
1950 char16_t and char32_t.
1951 * lex.c (reswords): Add char16_t and char32_t (for c++0x).
1952 * mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
1953 extended builtin type "u8char{16,32}_t".
1954 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
1956 (cp_lexer_print_token): Support CPP_STRING{16,32}.
1957 (cp_parser_is_string_literal): Idem.
1958 (cp_parser_string_literal): Idem.
1959 (cp_parser_primary_expression): Support CPP_CHAR{16,32} and
1961 (cp_parser_simple_type_specifier): Support RID_CHAR{16,32}.
1962 * tree.c (char_type_p): Support char16_t and char32_t as char types.
1963 * typeck.c (string_conv_p): Support char16_t and char32_t.
1965 2008-04-17 Jason Merrill <jason@redhat.com>
1968 * call.c (build_user_type_conversion_1): Represent second step of
1969 copy-init with an rvalue conversion.
1970 (convert_like_real) [ck_user]: Don't implicitly add it here.
1972 2008-04-15 Jakub Jelinek <jakub@redhat.com>
1975 * decl.c (layout_var_decl): If extern or static var has variable
1976 size, set TREE_TYPE (decl) to error_mark_node.
1978 2008-04-16 Danny Smith <dannysmith@users.sourceforge.net>
1981 * optimize.c (maybe_clone_body): Copy DECL_DLLIMPORT_P flag
1984 2008-04-09 Jason Merrill <jason@redhat.com>
1987 * semantics.c (finish_compound_literal): Return a TARGET_EXPR,
1988 not a pushed variable.
1990 2008-04-09 Volker Reichelt <v.reichelt@netcologne.de>
1992 * call.c (build_op_delete_call): Fix quotation in warning message.
1993 * decl.c (grokdeclarator): Quote keyword in error message.
1994 * pt.c (check_for_bare_parameter_packs): Fix quotation in error
1997 * parser.c (cp_parser_check_type_definition): Print error string
1998 directly rather than using "%s".
1999 (cp_parser_postfix_expression): Fix quotation.
2000 (cp_parser_decltype): Likewise.
2001 (cp_parser_sizeof_operand): Fix quotation. Simplify.
2003 * parser.c (cp_parser_non_integral_constant_expression): Build error
2004 message with CONCAT rather than using "%s".
2005 (cp_parser_primary_expression): Fix quotation.
2006 (cp_parser_postfix_expression): Likewise.
2007 (cp_parser_postfix_dot_deref_expression): Likewise.
2008 (cp_parser_unary_expression): Likewise.
2009 (cp_parser_new_expression): Likewise.
2010 (cp_parser_delete_expression): Likewise.
2012 * parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
2013 as `)', not as `('. Fix quotation.
2014 (cp_parser_consume_semicolon_at_end_of_statement): Fix quotation.
2015 (cp_parser_primary_expression): Likewise.
2016 (cp_parser_nested_name_specifier_opt): Likewise.
2017 (cp_parser_postfix_expression): Likewise.
2018 (cp_parser_postfix_open_square_expression): Likewise.
2019 (cp_parser_parenthesized_expression_list): Likewise.
2020 (cp_parser_pseudo_destructor_name): Likewise.
2021 (cp_parser_new_expression): Likewise.
2022 (cp_parser_direct_new_declarator): Likewise.
2023 (cp_parser_delete_expression): Likewise.
2024 (cp_parser_cast_expression): Likewise.
2025 (cp_parser_question_colon_clause): Likewise.
2026 (cp_parser_builtin_offsetof): Likewise.
2027 (cp_parser_trait_expr): Likewise.
2028 (cp_parser_label_for_labeled_statement): Likewise.
2029 (cp_parser_compound_statement): Likewise.
2030 (cp_parser_selection_statement): Likewise.
2031 (cp_parser_condition): Likewise.
2032 (cp_parser_iteration_statement): Likewise.
2033 (cp_parser_already_scoped_statement): Likewise.
2034 (cp_parser_simple_declaration): Likewise.
2035 (cp_parser_linkage_specification): Likewise.
2036 (cp_parser_static_assert): Likewise.
2037 (cp_parser_decltype): Likewise.
2038 (cp_parser_conversion_function_id): Likewise.
2039 (cp_parser_operator_function_id): Likewise.
2040 (cp_parser_operator): Likewise.
2041 (cp_parser_type_parameter): Likewise.
2042 (cp_parser_template_id): Likewise.
2043 (cp_parser_explicit_instantiation): Likewise.
2044 (cp_parser_explicit_specialization): Likewise.
2045 (cp_parser_enum_specifier): Likewise.
2046 (cp_parser_namespace_definition): Likewise.
2047 (cp_parser_namespace_alias_definition): Likewise.
2048 (cp_parser_using_declaration): Likewise.
2049 (cp_parser_using_directive): Likewise.
2050 (cp_parser_asm_definition): Likewise.
2051 (cp_parser_direct_declarator): Likewise.
2052 (cp_parser_ptr_operator): Likewise.
2053 (cp_parser_parameter_declaration_clause): Likewise.
2054 (cp_parser_initializer_clause): Likewise.
2055 (cp_parser_class_specifier): Likewise.
2056 (cp_parser_member_specification_opt): Likewise.
2057 (cp_parser_member_declaration): Likewise.
2058 (cp_parser_pure_specifier): Likewise.
2059 (cp_parser_constant_initializer): Likewise.
2060 (cp_parser_base_clause): Likewise.
2061 (cp_parser_exception_specification_opt): Likewise.
2062 (cp_parser_try_block): Likewise.
2063 (cp_parser_function_try_block): Likewise.
2064 (cp_parser_handler): Likewise.
2065 (cp_parser_throw_expression): Likewise.
2066 (cp_parser_asm_operand_list): Likewise.
2067 (cp_parser_attributes_opt): Likewise.
2068 (cp_parser_label_declaration): Likewise.
2069 (cp_parser_constructor_declarator_p): Likewise.
2070 (cp_parser_template_declaration_after_export): Likewise.
2071 (cp_parser_single_declaration): Likewise.
2072 (cp_parser_objc_message_expression): Likewise.
2073 (cp_parser_objc_message_args): Likewise.
2074 (cp_parser_objc_encode_expression): Likewise.
2075 (cp_parser_objc_defs_expression): Likewise.
2076 (cp_parser_objc_protocol_expression): Likewise.
2077 (cp_parser_objc_selector_expression): Likewise.
2078 (cp_parser_objc_protocol_refs_opt): Likewise.
2079 (cp_parser_objc_typename): Likewise.
2080 (cp_parser_objc_method_keyword_params): Likewise.
2081 (cp_parser_objc_superclass_or_category): Likewise.
2082 (cp_parser_objc_try_catch_finally_statement): Likewise.
2083 (cp_parser_objc_synchronized_statement): Likewise.
2084 (cp_parser_objc_throw_statement): Likewise.
2085 (cp_parser_omp_var_list_no_open): Likewise.
2086 (cp_parser_omp_clause_default): Likewise.
2087 (cp_parser_omp_clause_if): Likewise.
2088 (cp_parser_omp_clause_num_threads): Likewise.
2089 (cp_parser_omp_clause_reduction): Likewise.
2090 (cp_parser_omp_clause_schedule): Likewise.
2091 (cp_parser_omp_critical): Likewise.
2092 (cp_parser_omp_for_loop): Likewise.
2093 (cp_parser_omp_sections_scope): Likewise.
2095 * parser.c (cp_parser_template_parameter_list): Simplify.
2097 2008-04-07 James E. Wilson <wilson@tuliptree.org>
2099 * pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
2101 2008-04-07 Jason Merrill <jason@redhat.com>
2104 * class.c (type_has_user_nondefault_constructor): A template
2105 counts as a nondefault constructor.
2107 2008-04-04 Paolo Bonzini <bonzini@gnu.org>
2109 * decl.c (cxx_push_function_context): Delete.
2110 (cxx_pop_function_context): Delete.
2111 (start_preparsed_function): Merge cxx_push_function_context (!f->decl
2113 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_INIT,
2114 LANG_HOOKS_FUNCTION_FINAL): Delete.
2115 (LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P): Rename to
2116 LANG_HOOKS_MISSING_NORETURN_OK_P.
2117 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context):
2119 * semantics.c (current_stmt_tree): Fix comment.
2121 2008-04-03 Jakub Jelinek <jakub@redhat.com>
2124 * semantics.c (finish_offsetof): Undo effect of convert_from_reference
2125 before calling fold_offsetof.
2127 2008-04-03 Tom Tromey <tromey@redhat.com>
2129 * Make-lang.in (c++_OBJS): New variable.
2131 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
2133 * optimize.c (clone_body): New, from tree-inline.c.
2135 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
2137 * method.c (synthesize_method): Use {push,pop}_function_context.
2138 * name-lookup.c (push_to_top_level): Likewise.
2139 * parser.c (cp_parser_late_parsing_for_member): Likewise.
2141 2008-03-30 Volker Reichelt <v.reichelt@netcologne.de>
2144 * parser.c (cp_parser_decl_specifier_seq): Add location to error
2147 2008-03-27 Tom Tromey <tromey@redhat.com>
2149 * Make-lang.in: Revert automatic dependency patch.
2151 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
2154 * typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
2155 (build_compound_expr): New, for compatibility with C
2156 build_compound_expr.
2157 (cp_build_compound_expr): Renamed from build_compound_expr.
2158 (build_c_cast): New, for compatibility with C build_c_cast.
2159 (cp_build_c_cast): Renamed from build_c_cast.
2160 * init.c (build_vec_delete_1): Fix calls to build_compound_expr.
2161 * decl.c (cxx_maybe_build_cleanup): Ditto.
2162 * cp-tree.h (build_compound_expr): Add C-compatibile prototype.
2163 (cp_build_compound_expr): Renamed from build_compound_expr.
2164 (build_c_cast): Add C-compatible prototype.
2165 (cp_build_c_cast): Renamed from build_c_cast.
2166 * typeck2.c (build_functional_cast): Use cp_build_c_cast.
2167 * parser.c (cp_parser_cast_expression): Fix call to build_c_cast.
2169 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
2171 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Cope with
2172 tsubst_pack_expansion returning a pack expansion, or a TREE_VEC
2173 ending in a pack expansion, both of which can occur when
2174 substituting into a nested template.
2175 (tsubst_copy_and_build) <case SIZEOF_EXPR>: When we're
2176 instantiating the sizeof...(X) form, make tsubst_copy do the work.
2177 * parser.c (cp_parser_template_parameter): Deal with unnamed
2178 non-type template parameter packs identified by pack expansions in
2181 2008-03-26 Jakub Jelinek <jakub@redhat.com>
2184 * pt.c (apply_late_template_attributes): Don't call tsubst on
2185 first attribute argument if it is IDENTIFIER_NODE.
2188 * error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
2189 and LTGT_EXPR to pp_expression.
2191 2008-03-26 Douglas Gregor <doug.gregor@gmail.com>
2193 * pt.c (coerce_template_template_parm): Moved the body of the loop
2194 of coerce_template_template_parms here, to make iteration over a
2195 template argument pack simpler.
2196 Also, allow matching of a template parameter pack in the template
2197 template parameter to a template parameter in the template
2199 (coerce_template_template_parms): Deal with variadic template
2200 template parameters. Use coerce_template_template_parm.
2201 (unify): Make sure we coerce the template template argument's
2202 template arguments to the template template parameter's template
2203 parameters, not the other way around.
2205 2008-03-25 Tom Tromey <tromey@redhat.com>
2207 * Make-lang.in: Remove .o targets.
2208 (cp/g++spec.o): Moved to cp/. Reduce to variable setting.
2210 (c++_OBJS): New variable.
2211 (CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
2213 2008-03-25 Douglas Gregor <doug.gregor@gmail.com>
2215 * typeck.c (composite_pointer_type_r): Add SFINAE support.
2216 (composite_pointer_type): Ditto.
2217 (common_type): Fix call to composite_pointer_type.
2218 (cxx_sizeof_nowarn): New; used to be a macro.
2219 (cxx_sizeof_expr): Add SFINAE support.
2220 (cxx_alignof_expr): Ditto.
2221 (decay_conversion): Fix calls for SFINAE support.
2222 (rationalize_conditional_expr): Add SFINAE support.
2223 (build_class_member_access_expr): Ditto.
2224 (finish_class_member_access_expr): Ditto.
2225 (build_x_indirect_ref): Ditto.
2226 (build_indirect_ref): Original version renamed to
2227 cp_build_indirect_ref; new version provides a bridge from
2229 (cp_build_indirect_ref): Was build_indirect_ref; added SFINAE
2231 (get_member_function_from_ptrfunc): Fix calls for SFINAE support.
2232 (build_function_call): Original version renamed to
2233 cp_build_function_call; new version provides a bridge from
2235 (cp_build_function_call): Was build_function_call; added SFINAE
2237 (convert_arguments): Add SFINAE support.
2238 (build_x_binary_op): Ditto.
2239 (build_binary_op): Original version renamed to cp_build_binary_op;
2240 new version provides a bridge from c-common.
2241 (cp_build_binary_op): Was build_binary_op; added SFINAE support.
2242 (pointer_diff): Fix calls for SFINAE.
2243 (build_x_unary_op): Add SFINAE support.
2244 (condition_conversion): Fix calls for SFINAE.
2245 (build_unary_op): Original version renamed to cp_build_unary_op;
2246 new version provides a bridge from c-common.
2247 (cp_build_unary_op): Was build_unary_op; added SFINAE support.
2248 (unary_complex_lvalue): Fix calls for SFINAE.
2249 (build_x_conditional_expr): Add SFINAE support.
2250 (build_x_compound_expr_from_list): Fix calls for SFINAE.
2251 (build_x_compound_expr): Add SFINAE support.
2252 (convert_ptrmem): Fix calls for SFINAE.
2253 (build_static_cast_1): Add SFINAE support.
2254 (build_static_cast): Ditto.
2255 (build_reinterpret_cast_1): Ditto.
2256 (build_reinterpret_cast): Ditto.
2257 (build_const_cast_1): Ditto.
2258 (build_const_cast): Ditto.
2259 (build_c_cast): Ditto.
2260 (build_modify_expr): Original version renamed to
2261 cp_build_modify_expr; new version provides a bridge from c-common.
2262 (cp_build_modify_expr): Was build_modify_expr; added SFINAE
2264 (build_x_modify_expr): Add SFINAE support.
2265 (build_ptrmemfunc): Fix calls for SFINAE.
2266 (convert_for_assignment): Add SFINAE support.
2267 (convert_for_initialization): Ditto.
2268 (check_return_expr): Fix calls for SFINAE.
2269 (lvalue_or_else): Add SFINAE support.
2270 * init.c (perform_member_init): Fix calls for SFINAE.
2271 (emit_mem_initializers): Ditto.
2272 (expand_virtual_init): Ditto.
2273 (expand_cleanup_for_base): Ditto.
2274 (build_aggr_init): Add SFINAE support.
2275 (expand_default_init): Ditto.
2276 (expand_aggr_init_1): Fix calls for SFINAE.
2277 (build_offset_ref): Ditto.
2278 (build_new_1): Add SFINAE support.
2280 (build_vec_delete_1): Fix calls for SFINAE.
2281 (get_temp_regvar): Ditto.
2282 (build_vec_init): Add SFINAE support.
2283 (build_dtor_call): Fix calls for SFINAE.
2284 (build_delete): Ditto.
2285 (push_base_cleanups): Ditto.
2286 (build_vec_delete_1): Ditto.
2287 * class.c (build_base_path): Fix calls for SFINAE.
2288 (build_simple_base_path): Ditto.
2289 (convert_to_base_statically): Ditto.
2290 (build_vfn_ref): Ditto.
2291 (resolve_address_of_overloaded_function): Ditto.
2292 * decl.c (check_initializer): Fix calls for SFINAE.
2293 (register_dtor_fn): Ditto.
2294 (compute_array_index_type): Ditto.
2295 (finish_enum): Ditto.
2296 (start_preparsed_function): Ditto.
2297 (cxx_maybe_build_cleanup): Ditto.
2298 * call.c (convert_like): Add COMPLAIN argument.
2299 (convert_like_with_context): Ditto.
2300 (build_this): Fix calls for SFINAE.
2301 (build_user_type_conversion): Ditto.
2302 (resolve_args): Ditto.
2303 (build_new_function_call): Add SFINAE support.
2304 (build_operator_new_call): Fix calls for SFINAE.
2305 (build_object_call): Add SFINAE support.
2306 (build_conditional_expr): Ditto.
2307 (build_new_op): Ditto.
2308 (build_op_delete_call): Fix calls for SFINAE.
2309 (build_temp): Ditto.
2310 (convert_like_real): Add SFINAE support.
2311 (build_x_va_arg): Fix calls for SFINAE.
2312 (convert_default_arg): Ditto.
2313 (build_over_call): Add SFINAE support.
2314 (build_java_interface_fn_ref): Fix calls for SFINAE.
2315 (build_special_member_call): Add SFINAE support.
2316 (build_new_method_call): Ditto.
2317 (perform_implicit_conversion): Ditto.
2318 (perform_direct_initialization_if_possible): Ditto.
2319 (initialize_reference): Fix calls for SFINAE.
2320 * method.c (do_build_assign_ref): Fix calls for SFINAE.
2321 * rtti.c (build_headof): Fix calls for SFINAE.
2322 (get_tinfo_decl_dynamic): Ditto.
2323 (get_typeid): Ditto.
2324 (build_dynamic_cast_1): Add SFINAE support.
2325 (build_dynamic_cast): Ditto.
2326 (tinfo_base_init): Fix calls for SFINAE.
2327 * except.c (do_get_exception_ptr): Fix calls for SFINAE.
2328 (do_end_catch): Ditto.
2329 (initialize_handler_parm): Ditto.
2330 (expand_start_catch_block): Ditto.
2331 (do_allocate_exception): Ditto.
2332 (do_free_exception): Ditto.
2333 (build_throw): Ditto.
2334 * cvt.c (build_up_reference): Fix calls for SFINAE.
2335 (convert_to_reference): Ditto.
2336 (ocp_convert): Ditto.
2337 (convert_to_void): Add SFINAE support.
2338 * tree.c (build_dummy_object): Fix calls for SFINAE.
2339 (stabilize_expr): Ditto.
2340 * cp-tree.h (build_conditional_expr): Add tsubst_flags_t
2342 (build_new_method_call): Ditto.
2343 (build_special_member_call): Ditto.
2344 (build_new_op): Ditto.
2345 (perform_implicit_conversion): Ditto.
2346 (perform_direct_initialization_if_possible): Ditto.
2347 (convert_to_void): Ditto.
2348 (build_aggr_init): Ditto.
2350 (build_vec_init): Ditto.
2351 (build_dynamic_cast): Ditto.
2352 (finish_call_expr): Ditto
2353 (cxx_sizeof_or_alignof_expr): Add COMPLAIN parameter.
2354 (cxx_sizeof_nowarn): Remove macro; add function declaration.
2355 (build_class_member_access_expr): Add tsubst_flags_t parameter.
2356 (finish_class_member_access_expr): Ditto.
2357 (build_x_indirect_ref): Ditto.
2358 (cp_build_indirect_ref): New.
2359 (cp_build_function_call): Add tsubst_flags_t parameter.
2360 (build_x_unary_op): Ditto.
2361 (cp_build_unary_op): New.
2362 (build_x_conditional_expr): Add tsubst_flags_t parameter.
2363 (build_x_compound_expr): Ditto.
2364 (build_compound_expr): Ditto.
2365 (build_static_cast): Ditto.
2366 (build_reinterpret_cast): Ditto.
2367 (build_const_cast): Ditto.
2368 (build_c_cast): Ditto.
2369 (build_x_modify_expr): Ditto.
2370 (cp_build_modify_expr): New.
2371 (convert_for_initialization): Add tsubst_flags_t parameter.
2372 (cp_build_binary_op): Remove macro; add function declaration.
2373 (invalid_nonstatic_memfn_p): Add tsubst_flags_t parameter.
2374 (lvalue_or_else): Ditto.
2375 (build_functional_cast): Ditto.
2376 * typeck2.c (digest_init): Fix calls for SFINAE.
2377 (process_init_constructor_array): Ditto.
2378 (process_init_constructor_record): Ditto.
2379 (build_x_arrow): Ditto.
2380 (build_m_component_ref): Ditto.
2381 (build_functional_cast): Add SFINAE support.
2382 * pt.c (tsubst_copy_and_build): Add (more) SFINAE support.
2383 * semantics.c (simplify_loop_decl_cond): Fix calls for SFINAE.
2384 (finish_expr_stmt): Ditto.
2385 (finish_for_expr): Ditto.
2386 (finish_asm_stmt): Ditto.
2387 (finish_non_static_data_member): Ditto.
2388 (finish_qualified_id_expr): Ditto.
2389 (finish_call_expr): Add SFINAE support.
2390 (finish_increment_expr): Fix calls for SFINAE.
2391 (finish_unary_op_expr): Ditto.
2392 (simplify_aggr_init_expr): Ditto.
2393 (finish_omp_clauses): Ditto.
2394 (finish_omp_for): Ditto.
2395 (finish_omp_barrier): Ditto.
2396 (finish_omo_flush): Ditto.
2397 * decl2.c (grok_array_decl): Fix calls or SFINAE.
2398 (build_anon_union_vars): Ditto.
2399 (get_guard_cond): Ditto.
2401 (one_static_initialization_or_destruction): Ditto.
2402 (do_static_initialization_or_destruction): Ditto.
2403 (generate_ctor_or_dtor_function): Ditto.
2404 (build_offset_ref_call_from_tree): Ditto.
2405 * parser.c (cp_parser_postfix_expression): Fix calls for SFINAE.
2406 (cp_parser_postfix_dot_deref_expression): Ditto.
2407 (cp_parser_unary_expression): Ditto.
2408 (cp_parser_new_expression): Ditto.
2409 (cp_parser_cast_expression): Ditto.
2410 (cp_parser_binary_expression): Ditto.
2411 (cp_parser_question_colon_clause): Ditto.
2412 (cp_parser_assignment_expression): Ditto.
2413 (cp_parser_expression): Ditto.
2414 (cp_parser_builtin_offsetof): Ditto.
2415 (cp_parser_template_argument): Ditto.
2416 (cp_parser_functional_cast): Ditto.
2418 2008-03-24 Tom Tromey <tromey@redhat.com>
2420 * lex.c (handle_pragma_interface): Don't copy the filename.
2421 (handle_pragma_implementation): Copy filename using xstrdup.
2423 2008-03-21 Paolo Carlini <pcarlini@suse.de>
2425 * cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P.
2426 (SET_IS_AGGR_TYPE): Rename to SET_CLASS_TYPE_P.
2427 (IS_AGGR_TYPE_CODE): Rename to RECORD_OR_UNION_CODE_P.
2428 (PROMOTES_TO_AGGR_TYPE): Remove.
2429 (CLASS_TYPE_P, TYPE_NON_AGGREGATE_CLASS): Adjust.
2430 * typeck.c (unary_complex_lvalue, build_modify_expr,
2431 convert_for_initialization): Adjust.
2432 * init.c (is_aggr_type): Remove.
2433 (is_class_type): Add.
2434 (build_offset_ref, build_new_1, build_vec_delete_1, build_vec_init,
2435 build_delete): Adjust.
2436 * lex.c (make_aggr_type): Remove.
2437 (make_class_type): Add.
2438 (cxx_make_type): Adjust.
2439 * class.c (finish_struct_1, fixed_type_or_null, is_empty_class):
2441 * decl.c (build_typename_type, make_typename_type,
2442 make_unbound_class_template, cxx_init_decl_processing,
2443 check_tag_decl, groktypename, start_decl_1, layout_var_decl,
2444 check_initializer, cp_finish_decl, build_ptrmemfunc_type, grokparms,
2445 grok_op_properties, xref_tag, check_function_type): Adjust.
2446 * call.c (check_dtor_name, standard_conversion, implicit_conversion,
2447 add_builtin_candidate, add_builtin_candidates,
2448 build_user_type_conversion_1, convert_like_real, build_cxx_call,
2449 is_subseq, compare_ics): Adjust.
2450 * method.c (use_thunk): Adjust.
2451 * rtti.c (build_dynamic_cast_1, create_pseudo_type_info,
2452 create_tinfo_types): Adjust.
2453 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
2454 build_up_reference, convert_to_reference, convert_from_reference,
2455 ocp_convert, build_expr_type_conversion): Adjust.
2456 * tree.c (bind_template_template_parm, error_type): Adjust.
2457 * dump.c (cp_dump_tree): Adjust.
2458 * search.c (lookup_member): Adjust.
2459 * friend.c (make_friend_class, do_friend): Adjust.
2460 * typeck2.c (store_init_value, process_init_constructor_array,
2461 process_init_constructor_record, build_x_arrow, build_m_component_ref,
2462 build_functional_cast): Adjust.
2463 * pt.c (finish_member_template_decl, process_template_parm,
2464 lookup_template_class, tsubst_function_type, tsubst,
2465 tsubst_copy_and_build, get_template_base, bt_instantiate_type_proc):
2467 * semantics.c (begin_class_definition, finish_base_specifier,
2468 finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
2470 * name-lookup.c (constructor_name_p, push_overloaded_decl,
2471 do_class_using_decl, lookup_qualified_name,
2472 maybe_process_template_type_declaration): Adjust.
2473 * decl2.c (grok_array_decl, check_member_template,
2474 constrain_class_visibility): Adjust.
2475 * parser.c (cp_parser_class_name): Adjust.
2477 2008-03-18 Paolo Bonzini <bonzini@gnu.org>
2479 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
2481 2008-03-17 Jason Merrill <jason@redhat.com>
2484 * call.c (reference_binding): Check LOOKUP_NO_TEMP_BIND when binding
2485 a temp directly to a reference as per DR391.
2487 2008-03-12 Richard Guenther <rguenther@suse.de>
2491 2008-02-04 Richard Guenther <rguenther@suse.de>
2494 * decl.c (record_builtin_java_type): Make jboolean a
2495 integer type again where its mode doesn't match that of bool.
2497 2008-01-25 Richard Guenther <rguenther@suse.de>
2500 * decl.c (record_builtin_java_type): Make __java_boolean
2502 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
2503 after TYPE_MAIN_VARIANT check.
2505 2008-03-10 Jakub Jelinek <jakub@redhat.com>
2508 * semantics.c (finish_omp_clauses): Look through NOP_EXPR even
2512 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
2513 DECL_P in not a variable and appears more than once error messages.
2515 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
2519 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
2523 * typeck.c (structural_comptypes): Call cp_comptypes.
2524 (comptypes): New; called from the C/C++ common bits to perform
2526 (cp_comptypes): Renamed from comptypes, which is already used,
2527 with a different signature, by the C++ front end.
2528 (build_reinterpret_cast_1): Call cp_comptypes.
2529 (ptr_reasonably_similar): Ditto.
2530 * decl.c (decls_match): Ditto.
2531 * cvt.c (convert_to_reference): Ditto.
2532 * cp-tree.h (same_type_p): Ditto.
2533 (same_or_base_type_p): Ditto.
2534 (comptypes): Rename to cp_comptypes.
2535 * pt.c (canonical_type_parameter): Call cp_comptypes.
2537 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
2539 * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
2540 test for equivalence between pointer and references.
2542 2008-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2545 * class.c (finish_struct_anon): Use permerror instead of pedwarn.
2546 (check_field_decls): Likewise.
2547 (note_name_declared_in_class): Likewise.
2548 * call.c (build_new_op): Likewise.
2549 (convert_like_real): Likewise.
2550 (build_over_call): Likewise.
2551 * lex.c (unqualified_fn_lookup_error): Likewise.
2552 * parser.c (cp_parser_template_id): Likewise.
2553 * cvt.c (warn_ref_binding): Likewise.
2554 (convert_to_reference): Likewise.
2555 (ocp_convert): Likewise.
2556 (convert_to_void): Use error instead of pedwarn.
2557 * error.c (cp_cpp_error): Use pedantic_warning_kind.
2558 * decl.c (compute_array_index_type): Use constant_expression_error.
2560 2008-03-01 Douglas Gregor <doug.gregor@gmail.com>
2562 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Note
2563 that auto is either a storage class or a simple type specifier,
2564 depending on the dialect.
2565 (cp_parser_decl_specifier_seq): Complain about `auto' as a storage
2566 specifier in C++98 mode, error in C++0x mode (since we don't
2567 support auto as a type specifier, yet).
2568 (cp_parser_storage_class_specifier_opt): Don't treat `auto' as a
2569 storage specifier in C++0x mode.
2570 (cp_parser_simple_type_specifier): Parse `auto' as a
2571 simple-type-specifier, but error because we don't support it yet.
2573 2008-02-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2575 * parser.c (cp_parser_nonclass_name): New.
2576 (cp_parser_pseudo_destructor_name): Use it instead of
2577 cp_parser_type_name.
2578 (cp_parser_type_name): Move code to cp_parser_nonclass_name.
2580 2008-02-29 Tom Tromey <tromey@redhat.com>
2582 * parser.c (struct cp_token) <input_file_stack_index>: Remove.
2583 (cp_lexer_get_preprocessor_token): Update.
2584 (cp_lexer_set_source_position_from_token): Don't call
2585 restore_input_file_stack.
2586 * lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
2588 2008-02-28 Richard Guenther <rguenther@suse.de>
2591 2008-02-26 Richard Guenther <rguenther@suse.de>
2593 * decl.c (duplicate_decls): Remove decl from global mapping
2594 before ggc_freeing it.
2596 2008-02-27 Jakub Jelinek <jakub@redhat.com>
2599 * rtti.c: Include c-pragma.h.
2600 (push_abi_namespace, pop_abi_namespace): New functions.
2601 (build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
2602 create_tinfo_types, emit_support_tinfos): Use them.
2603 * Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
2605 2008-02-26 Jason Merrill <jason@redhat.com>
2608 * decl.c (grokdeclarator): Allow a typedef of an unnamed struct
2609 to name the struct for linkage purposes even if it has attributes.
2610 (start_decl): In that case, set ATTR_FLAG_TYPE_IN_PLACE.
2612 2008-02-26 Tom Tromey <tromey@redhat.com>
2614 * parser.c (eof_token): Remove old location code.
2615 (check_empty_body): Remove test of USE_MAPPED_LOCATION.
2616 * decl2.c (generate_ctor_or_dtor_function): Remove old location
2618 (cp_write_global_declarations): Likewise.
2619 * lex.c (cxx_init): Remove old location code.
2620 (handle_pragma_implementation): Remove test of
2621 USE_MAPPED_LOCATION.
2622 * pt.c (tsubst): Remove old location code.
2623 * error.c (cp_print_error_function): Remove test of
2624 USE_MAPPED_LOCATION.
2625 * decl.c (pop_label): Remove old location code.
2626 (finish_function): Likewise.
2628 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2631 * call.c (magic_varargs_p): Remove BUILT_IN_STDARG_START.
2633 2008-02-26 Richard Guenther <rguenther@suse.de>
2635 * decl.c (duplicate_decls): Remove decl from global mapping
2636 before ggc_freeing it.
2638 2008-02-26 Paolo Carlini <pcarlini@suse.de>
2641 * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
2643 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2645 * typeck.c (build_class_member_access_expr): Add appropriate
2646 OPT_W* parameter to warning.
2647 (build_reinterpret_cast_1): Likewise.
2648 * name-lookup.c (push_overloaded_decl): Likewise.
2650 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2653 * error.c (dump_expr): Handle CONJ_EXPR.
2655 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2658 * error.c (dump_type): Handle FIXED_POINT_TYPE.
2659 (dump_expr): Handle FIXED_CST.
2661 2008-02-24 Jason Merrill <jason@redhat.com>
2663 * parser.c (cp_parser_declaration): Handle "inline namespace".
2664 (cp_parser_namespace_definition): Likewise.
2667 * name-lookup.c (arg_assoc_namespace): Look down into inline
2670 2008-02-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2672 * typeck.c (check_for_casting_away_constness): Use 1 single
2673 argument, the type of cast, to decide what diagnostics generate.
2674 (build_static_cast_1): Remove unused code. Update call to
2675 check_for_casting_away_constness.
2676 (build_reinterpret_cast_1): Update call to
2677 check_for_casting_away_constness.
2678 (build_const_cast_1): Likewise.
2680 2008-02-24 Paolo Carlini <pcarlini@suse.de>
2682 * error.c (dump_expr): Don't deal directly with NEW_EXPR (and
2683 VEC_NEW_EXPR), forward to pp_expression.
2684 * cxx-pretty-print.c (pp_cxx_new_expression): Fix FIXME.
2686 2008-02-24 Danny Smith <dannysmith@users.sourceforge.net>
2689 * friend.c (do_friend): Call cplus_decl_attributes earlier.
2691 2008-02-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
2694 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
2695 template decls' function decl.
2697 2008-02-22 Paolo Carlini <pcarlini@suse.de>
2701 2008-02-14 Paolo Carlini <pcarlini@suse.de>
2704 * pt.c (determine_specialization): In case of function templates,
2705 when the type of DECL does not match FN there is no match.
2707 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2710 * typeck.c (build_binary_op): Warn about floating point
2711 comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
2713 2008-02-19 Jason Merrill <jason@redhat.com>
2716 * pt.c (resolve_overloaded_unification): Set processing_template_decl
2717 while we look for possible bindings.
2719 2008-02-19 Jakub Jelinek <jakub@redhat.com>
2722 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
2726 * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
2727 vars. Afterwards ensure v is VAR_DECL.
2730 * parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
2731 call cp_finish_decl.
2732 * semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
2735 2008-02-15 Douglas Gregor <doug.gregor@gmail.com>
2740 * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
2741 is error_mark_node, return an error early.
2742 (find_parameter_packs_r): Pass the pointer set along to recursive
2743 calls of cp_walk_subtrees; don't try to manage the pointer set
2745 (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
2746 (make_pack_expansion): Ditto.
2747 (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
2748 a second pass through the tree with find_parameter_packs_r; that
2749 second pass no longer does anything.
2750 (push_template_decl_real): If we have an erroneous declaration,
2751 set its type to error_mark_node before returning an error.
2753 2008-02-14 Douglas Gregor <doug.gregor@gmail.com>
2756 * pt.c (tsubst_initializer_list): Deal with the use of
2757 VOID_TYPE_NODE to indicate value-initialization of the bases.
2759 2008-02-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2760 Jason Merrill <jason@redhat.com>
2764 * class.c (type_has_user_nondefault_constructor): New fn.
2765 * cp-tree.h: Declare it.
2766 * init.c (emit_mem_initializers): Use it for -W warning about
2767 missing base initializer.
2769 2008-02-14 Paolo Carlini <pcarlini@suse.de>
2772 * pt.c (determine_specialization): In case of function templates,
2773 when the type of DECL does not match FN there is no match.
2775 2008-02-13 Jakub Jelinek <jakub@redhat.com>
2776 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2779 * parser.c (cp_parser_pseudo_destructor_name): If next tokens
2780 are not identifier :: ~, return before calling cp_parser_type_name.
2782 2008-02-13 Jason Merrill <jason@redhat.com>
2784 PR c++/34962, c++/34937, c++/34939
2785 * decl2.c (is_late_template_attribute): Always defer attributes
2786 vector_size and weak.
2789 * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
2790 of enumerators, too.
2792 2008-02-12 Jason Merrill <jason@redhat.com>
2795 * call.c (convert_like_real): Pass LOOKUP_NO_CONVERSION to build_temp
2796 if we're doing conversions to call a user-defined conversion function.
2798 2008-02-12 Steven Bosscher <steven@gcc.gnu.org>
2801 * semantics.c (finish_qualified_id_expr): Avoid duplicate access
2804 2008-02-12 Jakub Jelinek <jakub@redhat.com>
2807 * init.c (build_new_1): Don't create placement_expr before
2808 constructing alloc_call. Verify that the pointer is passed by
2809 value to operator new.
2811 2008-02-11 Jason Merrill <jason@redhat.com>
2814 * pt.c (tsubst): Don't look up a template typedef in an explicit
2817 2008-02-11 Douglas Gregor <doug.gregor@gmail.com>
2820 * tree.c (cp_build_qualified_type_real): When building a
2821 cv-qualified array type, build it as a unique type with
2822 build_cplus_array_type_1 and then adopt the unqualified type's
2825 2008-02-11 Paolo Carlini <pcarlini@suse.de>
2828 * decl.c (groktypename): Check grokdeclarator return.
2830 2008-02-10 Jason Merrill <jason@redhat.com>
2833 * decl2.c (cp_write_global_declarations): Don't write out static
2834 data members with DECL_IN_AGGR_P set.
2836 2008-02-08 Jason Merrill <jason@redhat.com>
2839 * tree.c (build_target_expr_with_type): Handle void initializer.
2840 (bot_manip): Remap slot before recursing.
2842 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2845 * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
2847 2008-02-06 Alexandre Oliva <aoliva@redhat.com>
2850 * tree.c: Include tree-flow.h.
2851 (build_target_expr): Check type compatibility.
2852 * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
2853 * call.c (convert_like_real): Convert bitfield to expected type.
2855 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
2859 * typeck.c (structural_comptypes): Call cp_comptypes.
2860 (comptypes): New; called from the C/C++ common bits to perform
2862 (cp_comptypes): Renamed from comptypes, which is already used,
2863 with a different signature, by the C++ front end.
2864 (build_reinterpret_cast_1): Call cp_comptypes.
2865 (ptr_reasonably_similar): Ditto.
2866 * decl.c (decls_match): Ditto.
2867 * cvt.c (convert_to_reference): Ditto.
2868 * cp-tree.h (same_type_p): Ditto.
2869 (same_or_base_type_p): Ditto.
2870 (comptypes): Rename to cp_comptypes.
2871 * pt.c (canonical_type_parameter): Call cp_comptypes.
2873 2008-02-05 Jakub Jelinek <jakub@redhat.com>
2876 * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
2877 value dependent expression.
2879 2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
2882 * decl2.c (save_template_attributes): When we're modifying the
2883 TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
2884 all of the other variants to add those same attributes. Otherwise,
2885 the main variant will be inconsistent with those other variants.
2887 2008-02-04 Richard Guenther <rguenther@suse.de>
2890 * decl.c (record_builtin_java_type): Make jboolean a
2891 integer type again where its mode doesn't match that of bool.
2893 2008-02-02 Jason Merrill <jason@redhat.com>
2894 Mark Mitchell <mark@codesourcery.com>
2897 * init.c (build_value_init_1): New function.
2898 (build_value_init): New function.
2899 * typeck2.c (build_functional_cast): Call it.
2900 * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
2902 * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from
2903 TYPE_HAS_CONSTRUCTOR.
2904 * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
2905 add_implicitly_declared_members): Adjust.
2906 (check_field_decls): Adjust. Remove warnings about reference/const
2907 in class without constructor.
2908 (check_bases_and_members): Adjust. Give those warnings here instead.
2909 * decl.c (fixup_anonymous_aggr): Adjust.
2910 (check_initializer): Adjust, clarify logic slightly.
2911 (grok_special_member_properties): Adjust, only set if user-provided.
2912 * rtti.c (create_tinfo_types): Don't set.
2913 * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
2914 Use same_type_ignoring_top_level_qualifiers_p.
2915 * pt.c (check_explicit_specialization): Adjust.
2916 (instantiate_class_template): Adjust.
2918 2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
2919 Jakub Jelinek <jakub@redhat.com>
2923 * typeck.c (structural_comptypes): Handle comparisons of
2924 VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
2926 * mangle.c (write_builtin_type): Map down to the canonical type,
2927 which will be one of the predefined type nodes.
2929 2008-01-29 Michael Meissner <michael.meissner@amd.com>
2932 * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
2933 bits to allow for expansion of the number of middle end tree
2936 2008-01-29 Douglas Gregor <doug.gregor@gmail.com>
2947 * typeck.c (check_return_expr): Tweak call to
2948 check_for_bare_parameter_packs.
2949 * class.c (add_method): Be careful with error_mark_nodes.
2950 * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
2952 * pt.c (struct find_parameter_pack_data): Remove
2954 (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
2955 (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
2956 (make_pack_expansion): Ditto.
2957 (check_for_bare_parameter_packs): Parameter is now a tree, not a
2959 (process_template_parm): Tweak call to
2960 check_for_bare_parameter_packs.
2961 (push_template_decl_real): Tweak calls to
2962 check_for_bare_parameter_packs. If bare parameter packs are found
2963 in the list of exceptions, clear out that list after giving an
2965 * semantics.c (finish_cond): Tweak call to
2966 check_for_bare_parameter_packs.
2967 (finish_expr_stmt): Ditto.
2968 (finish_for_expr): Ditto.
2969 (finish_switch_cond): Ditto.
2970 (finish_mem_initializers): Ditto.
2971 (finish_member_declaration): Ditto.
2972 (finish_static_assert): Check for bare parameter packs in the
2974 * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
2975 attributes of a declaration.
2976 * parser.c (cp_parser_using_declaration): Tweak call to
2977 check_for_bare_parameter_packs.
2978 (cp_parser_base_clause): Ditto.
2980 2008-01-28 Jason Merrill <jason@redhat.com>
2983 * class.c (build_base_path): Fix !want_pointer case.
2985 2008-01-27 Jason Merrill <jason@redhat.com>
2988 * class.c (build_base_path): Fix previous change.
2990 2008-01-26 Jakub Jelinek <jakub@redhat.com>
2993 * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
2996 2008-01-26 Richard Guenther <rguenther@suse.de>
2999 * typeck.c (build_binary_op): Remove code to shorten compares.
3001 2008-01-25 Richard Guenther <rguenther@suse.de>
3004 * decl.c (record_builtin_java_type): Make __java_boolean
3006 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
3007 after TYPE_MAIN_VARIANT check.
3009 2008-01-25 Jason Merrill <jason@redhat.com>
3012 * class.c (build_base_path): Don't mess with virtual access if
3014 * call.c (standard_conversion): Don't check whether source type
3017 * decl2.c (is_late_template_attribute): Don't defer attribute
3018 visibility just because the type is dependent.
3020 2008-01-25 Jason Merrill <jason@redhat.com>
3021 Mark Mitchell <mark@codesourcery.com>
3024 * call.c (standard_conversion): Allow conversion from integer/real
3026 (compare_ics): Such a conversion is worse than a normal arithmetic
3029 2008-01-25 Richard Guenther <rguenther@suse.de>
3032 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
3035 2008-01-24 Paolo Carlini <pcarlini@suse.de>
3038 * pt.c (push_template_decl_real): Return error_mark_node in case
3039 of template definition of non-template.
3041 2008-01-24 Jason Merrill <jason@redhat.com>
3044 * decl2.c (is_late_template_attribute): Defer any attribute with
3045 dependent args. Also defer type attributes if the type is dependent.
3047 2008-01-22 Jakub Jelinek <jakub@redhat.com>
3048 Alexandre Oliva <aoliva@redhat.com>
3051 * call.c (reference_binding): For bitfields use the declared bitfield
3053 (add_builtin_candidates): Likewise.
3054 * class.c (layout_class_type): For bitfields copy over the
3055 original type quals.
3057 2008-01-22 Jason Merrill <jason@redhat.com>
3060 * decl.c (groktypename): Also ignore attributes on dependent
3061 possibly-class types.
3064 * friend.c (do_friend): Check for prior declaration of a friend
3065 function of a local class.
3066 * name-lookup.c (lookup_name_innermost_nonclass_level):
3068 * name-lookup.h: Declare it.
3070 2008-01-22 Tom Tromey <tromey@redhat.com>
3073 * init.c (build_new_1): Only disallow Java aggregates.
3075 2008-01-22 Jakub Jelinek <jakub@redhat.com>
3078 * semantics.c (finish_omp_for): Don't call c_finish_omp_for
3079 if decl or init is error_mark_node.
3082 * error.c (dump_expr): Handle VECTOR_CST.
3084 2008-01-21 Jason Merrill <jason@redhat.com>
3087 * pt.c (tsubst_aggr_type): Make sure our context is complete.
3090 * pt.c (retrieve_local_specialization): Robustify.
3091 (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
3094 * pt.c (tsubst): Only call retrieve_local_specialization if the
3095 original typedef was in a function template.
3098 * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
3100 2008-01-21 Richard Guenther <rguenther@suse.de>
3103 * error.c (cp_print_error_function): Deal with recursive
3106 2008-01-20 Paolo Carlini <pcarlini@suse.de>
3109 * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
3111 2008-01-20 Paolo Carlini <pcarlini@suse.de>
3115 * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
3116 on non-IS_AGGR_TYPE scope.
3117 (constructor_name_p): Assert IS_AGGR_TYPE.
3119 2008-01-18 Ian Lance Taylor <iant@google.com>
3122 * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
3123 (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
3124 DECL_IS_OPERATOR_NEW flag.
3126 2008-01-16 Richard Guenther <rguenther@suse.de>
3129 * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
3130 for conversions to type variants.
3132 2008-01-15 Andreas Tobler <a.tobler@schweiz.org>
3134 * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
3135 declaration and code. Update copyright year.
3137 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3140 * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
3141 know we have a class type.
3143 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3146 * pt.c (coerce_template_parameter_pack): When substituting into
3147 the type of a non-type template parameter pack. use the
3148 deduced/substituted arguments.
3149 * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
3150 can be a parameter pack with the ellipsis following it. When we
3151 have an erroneous declaration, allow it to be a parameter pack.
3152 (cp_parser_template_parameter): Complain about default
3153 arguments on non-type template parameter packs, and parse them
3154 using the new cp_parser_default_argument.
3155 (cp_parser_parameter_declaration): Complain about parameter packs
3156 with default arguments. Move parsing of default arguments into a
3157 new function, cp_parser_default_argument.
3158 (cp_parser_default_argument): New; extracted from
3159 cp_parser_parameter_declaration.
3161 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3167 * typeck.c (check_return_expr): If there are bare parameter packs
3168 in the return value, set it to error_mark_node.
3169 * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
3170 * pt.c (find_parameter_packs_r): Look at the type of
3171 IDENTIFIER_NODEs (e.g., for user-defined conversions).
3172 (check_for_bare_parameter_packs): Flip the result: now returns
3173 TRUE when there were bare parameter packs, FALSE otherwise.
3174 (push_template_decl_real): Deal with flipped result of
3175 check_for_bare_parameter_packs.
3176 * semantics.c (finish_cond): If there are bare parameter packs in
3177 the conditional, set it to error_mark_node.
3178 (finish_expr_stmt): If there are bare parameter packs in the
3179 expression, set it to error_mark_node.
3180 (finish_for_expr): Ditto.
3181 (finish_switch_cond): If there are bare parameter packs in
3182 the conditional, set it to error_mark_node.
3183 (finish_mem_initializers): If there are bare parameter packs in
3184 the member initializer, set it to error_mark_node.
3185 (finish_member_declaration): Check the attributes of the
3186 declaration for bare parameter packs, and remove the attributes if
3187 any have bare parameter packs.
3188 * parser.c (cp_parser_using_declaration): Check the using
3189 declaration for bare parameter packs.
3190 (cp_parser_base_clause): If there are bare parameter packs in a
3191 base specifier, don't add it to the chain.
3193 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3196 * error.c (dump_simple_decl): Display ellipsis for template
3197 non-type parameter packs.
3198 (dump_decl): Display ellipsis for template type parameter packs.
3199 (dump_template_decl): Display ellipsis for template template
3201 * pt.c (redeclare_class_template): When redeclaring a class
3202 template, check for collisions between template parameters and
3203 template parameter packs.
3205 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3208 * pt.c (process_partial_specialization): Don't mark template
3209 parameters that occur in non-deduced contexts.
3210 (struct pair_fn_data): Add include_nondeduced_p.
3211 (for_each_template_parm_r): Only visit non-deduced contexts if
3212 include_nondeduced_p is set.
3213 (for_each_template_parm): Added parameter include_nondeduced_p,
3214 which states whether template parameters found in non-deduced
3215 contexts should be visited.
3216 (uses_template_parms): Visit all template parameters, even those
3217 in non-deduced contexts.
3219 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3222 * pt.c (check_default_tmpl_args): Check for parameter packs that
3223 aren't at the end of a primary template.
3224 (push_template_decl_real): Remove check for parameter packs that
3225 aren't at the end of a primary template; that now happens in
3226 check_default_tmpl_args.
3227 * semantics.c (finish_template_template_parm): Use
3228 check_default_tmpl_args to check for errors in the template
3231 2008-01-12 Doug Kwan <dougkwan@google.com>
3233 * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
3234 instead of OPT_Wreturn_type in warning due to ignored return type
3236 * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
3237 instead of OPT_Wreturn_type in warning due to ignored return type
3240 2008-01-08 Jakub Jelinek <jakub@redhat.com>
3243 * semantics.c (finish_omp_for): Don't call
3244 fold_build_cleanup_point_expr if processing_template_decl.
3246 2008-01-04 Paolo Carlini <pcarlini@suse.de>
3247 Jakub Jelinek <jakub@redhat.com>
3250 * error.c (dump_template_argument): Deal with TREE_LIST.
3252 2008-01-01 Douglas Gregor <doug.gregor@gmail.com>
3254 * parser.c (cp_parser_check_decl_spec): Don't warn about "long
3255 long" in C++0x mode; change the warning to note that "long long"
3256 is only unsupported in C++98 mode.
3259 Copyright (C) 2008 Free Software Foundation, Inc.
3261 Copying and distribution of this file, with or without modification,
3262 are permitted in any medium without royalty provided the copyright
3263 notice and this notice are preserved.