1 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
4 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
7 2007-08-17 Ollie Wild <aaw@google.com>
10 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
11 declarations into appropriate slots for comparison. Fix type
14 2007-08-17 Paolo Carlini <pcarlini@suse.de>
17 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
18 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
20 2007-08-17 Paolo Carlini <pcarlini@suse.de>
23 * parser.c (cp_parser_class_head): Improve error message.
25 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
27 * pt.c (instantiate_decl): Set input_location
30 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
32 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
34 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
35 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
36 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
37 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
38 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
39 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
40 * typeck.c (cp_type_quals): Likewise.
41 * typeck2.c (cxx_incomplete_type_diagnostic,
42 cxx_incomplete_type_error): Likewise.
44 2007-08-16 Paolo Carlini <pcarlini@suse.de>
47 * pt.c (tsubst_friend_function): When check_classfn
48 returns error_mark_node likewise return it.
50 2007-08-15 Jakub Jelinek <jakub@redhat.com>
53 * typeck.c (check_return_expr): Don't NRV optimize vars in
55 * decl.c (finish_function): Comment fix.
57 2007-08-15 Paolo Carlini <pcarlini@suse.de>
60 * pt.c (push_template_decl_real): Depending on TYPE_P
61 use either TYPE_CONTEXT or DECL_CONTEXT.
63 2007-08-14 Mark Mitchell <mark@codesourcery.com>
65 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
66 constructors and destructors return this.
68 2007-08-14 Paolo Carlini <pcarlini@suse.de>
71 * decl2.c (check_classfn): Return error_mark_node in case of error;
72 in that case, do not call add_method.
73 * decl.c (start_decl): Deal with check_classfn returning
75 (grokfndecl): Likewise.
76 * pt.c (tsubst_friend_function): Likewise.
78 2007-08-14 Andrew Pinski <pinskia@gmail.com>
81 * typeck.c (build_binary_op): Disallow vector float types with
82 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
84 2007-08-11 Ian Lance Taylor <iant@google.com>
86 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
88 * cp/cp-tree.h (cxx_get_alias_set): Update declaration.
90 2007-08-10 Ollie Wild <aaw@google.com>
92 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
94 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
96 (unqualified_namespace_lookup): Fix ambiguous_decl call.
97 (lookup_using_namespace): Fix ambiguous_decl call.
98 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
100 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
102 * call.c (name_as_c_string): Use CONST_CAST.
103 * decl.c (build_decl): Likewise.
104 * parser.c (cp_parser_string_literal): Likewise.
106 2007-08-10 Paolo Carlini <pcarlini@suse.de>
109 * error.c (dump_expr): Consistently use the *_cxx_*
110 variants of the pretty-print functions.
112 2007-08-10 Paolo Carlini <pcarlini@suse.de>
115 * decl.c (check_special_function_return_type): Just error
116 on return type specified for conversion operator.
118 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
120 * typeck2.c (readonly_error): Handle general expressions.
121 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
123 2007-08-06 Dan Hipschman <dsh@google.com>
125 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
126 access function name.
128 2007-08-04 Alfred Minarik <a.minarik@aon.at>
131 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
132 * g++spec.c (lang_specific_driver): Check them.
134 2007-08-06 Paolo Carlini <pcarlini@suse.de>
137 * pt.c (template_class_depth): Fix comment; change return type
140 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
143 2007-03-26 Dirk Mueller <dmueller@suse.de>
145 * parser.c (cp_parser_member_declaration): Pedwarn
146 about stray semicolons after member declarations.
148 2007-08-02 Lee Millward <lee.millward@gmail.com>
153 * parser.c (cp_parser_asm_definition): Detect and discard asm
154 statements with invalid inputs or outputs.
155 (cp_parser_asm_operand_list): Return error mark node if any
156 of the operands are invalid. Adjust documentation.
158 2007-08-02 Nick Clifton <nickc@redhat.com>
160 * typeck.c: Change copyright header to refer to version 3 of the
161 GNU General Public License and to point readers at the COPYING3
162 file and the FSF's license web page.
163 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
164 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
165 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
166 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
167 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
168 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
169 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
170 name-lookup.h, parser.c: Likewise.
172 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
175 * call.c (magic_varargs_p): Honor the "type generic" attribute.
177 2007-07-30 Paolo Carlini <pcarlini@suse.de>
180 * semantics.c (finish_label_stmt): Reject the __label__
181 extension outside function scopes.
183 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
185 * parser.c (eof_token): Un-constify.
186 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
187 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
190 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
192 * pt.c, tree.c, typeck2.c: Fix comment typos.
194 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
195 Mark Mitchell <mark@codesourcery.com>
198 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
199 hidden due to friend declarations in local classes.
201 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
203 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
204 * cp-tree.def (DECLTYPE_TYPE): New.
205 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
206 (dump_type_prefix): Ditto.
207 (dump_type_suffix): Ditto.
208 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
209 * mangle.c (write_type): Handle DECLTYPE_TYPE.
210 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
212 (DECLTYPE_TYPE_EXPR): New.
213 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
214 (finish_declared_type): Declare.
215 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
217 (pp_cxx_type_id): Ditto.
218 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
219 (tsubst): Substitute into a DECLTYPE_TYPE node.
220 (tsubst_copy): Ditto.
221 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
223 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
224 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
225 structural equality (because we can't hash the expressions).
226 (finish_declared_type): New.
227 * lex.c (reswords): Add "decltype" keyword.
228 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
229 (cp_parser_postfix_expression): Add member_access_only_p to
230 restrict postfix expression to member access expressions.
231 (cp_parser_unary_expression): Update call to
232 cp_parser_postfix_expression to reflect new parameter.
233 (cp_parser_declared_type): New.
234 (cp_parser_simple_type_specifier): Parse decltype types.
236 2007-07-27 Mark Mitchell <mark@codesourcery.com>
239 * call.c (convert_for_arg_passing): Only widen bitfields to their
240 declared types if necessary.
242 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
244 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
247 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
249 * decl.c (typename_hash, typename_compare): Constify.
250 * mangle.c (hash_type, compare_type): Likewise.
251 * pt.c (eq_local_specializations, hash_local_specialization):
253 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
254 list_hash): Likewise.
255 * typeck2.c (pat_compare): Likewise.
257 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
259 * method.c (implicitly_declare_fn): Increase alignment if member
260 function pointer format requires it.
262 2007-07-24 Paolo Carlini <pcarlini@suse.de>
265 * typeck.c (check_return_expr): Do not pass a null argument
268 2007-07-24 Paolo Carlini <pcarlini@suse.de>
271 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
274 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
277 * typeck.c (convert_arguments): Only use default args if we have
281 * typeck.c (structural_comptypes): No need to check
282 resolve_typename_type return value here.
283 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
284 * pt.c (resolve_typename_type): Follow typename typedefs. Return
285 original type rather than error_mark_node in case of failure.
286 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
287 resolve_typename_type result check.
288 (cp_parser_direct_declarator, cp_parser_head,
289 cp_parser_constructor_declarator_p): Likewise.
291 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
293 * pt.c (template_parms_variadic_p): Remove.
294 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
296 2007-07-12 Jakub Jelinek <jakub@redhat.com>
299 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
300 argument to dump_aggr_init_expr_args instead of false.
302 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
304 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
305 canonical types; otherwise, fall back to structural type
306 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
307 internal compiler error if the canonical types are wrong.
309 2007-07-11 Paolo Carlini <pcarlini@suse.de>
312 * parser.c (cp_parser_make_indirect_declarator): When the
313 the code argument is ERROR_MARK return cp_error_declarator.
315 2007-07-09 Geoffrey Keating <geoffk@apple.com>
318 * decl.c (cxx_init_decl_processing): Don't set
319 force_align_functions_log.
320 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
321 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
322 FUNCTION_DECL, return its alignment.
324 2007-07-09 Richard Guenther <rguenther@suse.de>
326 * decl.c (start_preparsed_function): Do not promote return type.
328 2007-07-08 Paolo Carlini <pcarlini@suse.de>
331 * pt.c (unify): Never pass error_mark_node to template_decl_level.
333 2007-07-07 Mark Mitchell <mark@codesourcery.com>
336 * pt.c (resolve_overloaded_unification): Robustify. Return a
338 (type_unification_real): Adjust accordingly.
340 2007-07-06 Richard Guenther <rguenther@suse.de>
342 * init.c (build_new_1): Use the correct pointer type.
343 * typeck2.c (build_m_component_ref): Likewise.
345 2007-07-05 Mark Mitchell <mark@codesourcery.com>
348 * init.c (build_zero_init): Always build an initializer for
350 * typeck2.c (build_functional_cast): Use build_zero_init.
353 * init.c (build_new_1): Always pass the allocation function to
354 build_op_delete_call.
355 * call.c (build_op_delete_call): Handle operator delete with a
356 variable-argument list. Do not issue an error when no matching
357 deallocation function is available for a new operator.
360 * cp-tree.h (any_value_dependent_elements_p): Declare it.
361 * decl.c (value_dependent_init_p): New function.
362 (cp_finish_decl): Use it.
363 * pt.c (value_dependent_expression_p): Use
364 any_value_dependent_elements_p.
365 * parser.c (cp_parser_primary_expression): Add comment about
366 treating dependent qualified names as integral
367 constant-expressions.
369 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
371 * decl.c (build_ptrmemfunc_type): Always use structural equality
372 tests when comparing pointer-to-member-function types, because the
373 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
376 2007-07-03 Mark Mitchell <mark@codesourcery.com>
378 * init.c (build_new): Tweak comment.
380 2007-06-29 Dave Brolley <brolley@redhat.com>
383 * parser.c (cp_parser_new_type_id): Don't reduce a named array
384 type to its base type and number of elements here.
385 * init.c (build_new): Call complete_type_or_else to ensure that the
386 type is complete and to issue a diagnostic if it is not.
387 (build_new_1): Don't call complete_type_or_else here.
389 2007-07-03 Richard Guenther <rguenther@suse.de>
392 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
395 2007-07-02 Simon Baldwin <simonb@google.com>
397 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
398 for inner-style nested forward declarations that don't declare
401 2007-07-02 Jakub Jelinek <jakub@redhat.com>
404 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
405 DECL_P in not a variable and appears more than once error messages.
407 2007-07-01 Ollie Wild <aaw@google.com>
409 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
410 (select_decl): Remove function.
411 (unqualified_namespace_lookup): Populate binding by calling
412 ambiguous_decl. Remove select_decl call.
413 (lookup_qualified_name): Remove select_decl call.
414 * decl.c (lookup_and_check_tag): Check for ambiguous references.
415 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
416 generation when name lookup is ambiguous.
418 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
421 * init.c (build_new_1): Use structural equality on the copy of the
424 2007-06-28 Geoffrey Keating <geoffk@apple.com>
426 * decl2.c (determine_visibility): Implement
427 flag_visibility_ms_compat effect on type info.
428 * decl.c (cxx_init_decl_processing): Implement
429 global effect of flag_visibility_ms_compat.
431 2007-06-28 Geoffrey Keating <geoffk@apple.com>
433 * decl2.c (start_objects): Mark constructor-running function
436 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
439 * decl.c (grokdeclarator): Reset friendp for member functions declared
440 friend of their own class.
442 2007-06-23 Mark Mitchell <mark@codesourcery.com>
444 * decl2.c (determine_visibility): Don't look for dllexport here.
445 (determine_visibility_from_class): Tidy.
447 2007-06-18 Simon Baldwin <simonb@google.com>
450 * parser.c (cp_parser_single_declaration): Added check for storage
451 class other than sc_none in parsed declaration, and a flag to indicate
452 if the call is part of an explicit template specialization parse.
453 * (cp_parser_explicit_specialization): Specialization check flag added
454 to call to cp_parser_single_declaration(), set true.
455 * (cp_parser_template_declaration_after_export): Specialization check
456 flag added to call to cp_parser_single_declaration(), set false.
457 * pt.c (check_explicit_specialization): Added code to copy visiblity
458 and linkage from the templated function to the explicit specialization.
460 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
462 * typeck.c (build_binary_op): For templates build the
463 expression in pieces to avoid the assert in build2_stat.
464 (get_member_function_from_ptrfunc):
465 Change over to using POINTER_PLUS_EXPR and convert
466 the second operand to sizetype.
467 * typeck2.c (build_m_component_ref): Likewise.
468 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
469 instead of PLUS_EXPR for pointers.
470 (build_new_1): Likewise.
471 (build_vec_delete_1): Likewise.
472 (build_vec_delete): Likewise.
473 * class.c (build_base_path): Likewise.
474 (build_base_path): Likewise.
475 (convert_to_base_statically): Likewise.
476 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
477 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
478 instead of PLUS_EXPR.
479 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
480 instead of PLUS_EXPR for pointers.
481 * call.c (build_special_member_call): Likewise.
482 * rtti.c (build_headof): Likewise.
483 Use sizetype instead of ptrdiff_type_node.
484 (tinfo_base_init): Create a POINTER_PLUS_EXPR
485 instead of PLUS_EXPR for pointers.
486 * except.c (expand_start_catch_block): Do a
487 NEGATIVE and then a POINTER_PLUS_EXPR instead
489 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
490 PLUS_EXPR on pointer types over to use
491 POINTER_PLUS_EXPR and remove the conversion
492 to the pointer types.
493 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
494 adding to a pointer type. Use size_int instead of
495 ssize_int. Convert the index to sizetype before
496 adding it to the pointer.
498 2007-06-15 Mark Mitchell <mark@codesourcery.com>
500 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
501 (DECL_ANON_UNION_VAR_P): New macro.
502 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
503 than DECL_VAR_MARKED_P, to keep track of which variables we have
505 * decl.c (redeclaration_error_message): Complain about redeclaring
506 anonymous union members at namespace scope.
507 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
509 2007-06-14 Geoff Keating <geoffk@apple.com>
511 * decl2.c (determine_visibility): Ensure that functions with
512 hidden types as parameters are hidden.
515 * decl2.c (determine_visibility): Remove duplicate code for
518 2007-06-12 Ian Lance Taylor <iant@google.com>
521 * init.c (avoid_placement_new_aliasing): New static function.
522 (build_new_1): Call it.
524 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
526 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
527 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
529 2007-06-08 Jakub Jelinek <jakub@redhat.com>
532 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
533 on init, the non-decl cond operand and increment value.
535 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
538 * decl.c (check_initializer): Report an error when a brace enclosed
539 initializer is used for a non-aggregate type in C++98.
540 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
542 (grokdeclarator): Likewise.
543 (move_fn_p): Likewise.
544 * typeck.c (check_return_expr): Likewise.
545 * call.c (reference_binding): Likewise.
546 * error.c (cp_cpp_error): Likewise.
547 * pt.c (check_default_tmpl_args): Likewise.
549 * lex.c (init_reswords): Likewise.
550 * parser.c (p_parser_primary_expression): Likewise.
551 (TOKEN_PRECEDENCE): Likewise.
552 (cp_parser_init_declarator): Likewise.
553 (cp_parser_ptr_operator): Likewise.
554 (cp_parser_parameter_declaration): Likewise.
555 (cp_parser_enclosed_template_argument_list): Likewise.
556 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
557 (cp_parser_next_token_ends_template_argument_p): Likewise.
559 2007-06-04 Simon Baldwin <simonb@google.com>
561 * decl.c (grokdeclarator): Readability change. Moved case labels
562 into direct switch statement scope.
564 2007-06-04 Paolo Carlini <pcarlini@suse.de>
566 * call.c (convert_like_real): Remove pointless code.
568 2007-05-31 Mark Mitchell <mark@codesourcery.com>
570 * decl.c (get_atexit_fn_ptr_type): New function.
571 (get_atexit_node): Use it.
572 (start_cleanup_fn): Likewise.
573 (register_dtor_fn): Use the object's destructor, instead of a
574 separate cleanup function, where possible.
575 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
576 (atexit_fn_ptr_type_node): New macro.
577 * decl2.c (build_cleanup): Use build_address.
579 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
581 * typeck.c (build_binary_op): Include types in error.
583 2007-05-31 Jakub Jelinek <jakub@redhat.com>
586 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
587 needs runtime initialization.
589 2007-05-31 Paolo Carlini <pcarlini@suse.de>
592 * semantics.c (finish_trait_expr): Complete the types.
594 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
595 Douglas Gregor <doug.gregor@gmail.com>
596 Pedro Lamarao <pedro.lamarao@mndfck.org>
597 Howard Hinnant <howard.hinnant@gmail.com>
601 * typeck.c (comptypes): Don't consider rvalue and lvalue
602 reference types to be equivalent.
603 (check_return_expr): Move from certain lvalues when returning
605 * decl.c (grokdeclarator): Implement reference collapsing.
606 (copy_fn_p): Don't consider constructors taking rvalue references
607 to be copy constructors.
609 * call.c (conversion): New "rvaluedness_matches_p" member.
610 (convert_class_to_reference): Require reference type as first
611 parameter instead of base type.
612 (reference_binding): Add logic to handle rvalue references.
613 (implicit_conversion): Update inaccurate comment.
614 (convert_like_real): Disable creation of temporaries that are
615 impossible to initialize for types with move constructors.
616 (build_over_call): Elide move constructors when possible.
617 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
618 (maybe_handle_ref_bind): Return conversion instead of type node.
619 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
620 determine preferred conversion sequences.
621 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
622 (LOOKUP_PREFER_RVALUE): New.
623 (DECL_MOVE_CONSTRUCTOR_P): New.
624 (struct cp_declarator): Add "reference" member for reference
625 types, with new "rvalue_ref" flag.
626 (cp_build_reference_type): Declare.
627 (move_fn_p): Declare.
628 * error.c (dump_type_prefix): Format rvalue reference types
629 correctly in error messages.
630 * except.c (build_throw): Move from certain lvalues when
632 * mangle.c (write_type): Mangle rvalue references differently
633 than regular references.
634 * parser.c (make_reference_declarator): Add boolean parameter for
636 (cp_parser_make_indirect_declarator): New.
637 (cp_parser_new_declarator_opt): Call
638 cp_parser_make_indirect_declarator.
639 (cp_parser_conversion_declarator_opt): Ditto.
640 (cp_parser_declarator): Ditto.
641 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
643 * pt.c (tsubst): Implement reference collapsing.
644 (maybe_adjust_types_for_deduction): Implement special template
645 parameter deduction rule for rvalue references.
646 (type_unification_real): Update calls to
647 maybe_adjust_types_for_deduction.
648 (try_one_overload): Ditto.
649 (unify_pack_expansion): Ditto.
650 * tree.c (lvalue_p_1): Handle rvalue reference types.
651 (cp_build_reference_type): New.
653 2007-05-30 Jakub Jelinek <jakub@redhat.com>
656 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
657 variables that need runtime initialization.
659 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
662 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
663 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
664 case POSTDECREMENT_EXPR>): Return the error_mark_node
665 if either the real or imaginary parts would an
668 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
669 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
672 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
673 token is a closing brace, false if there are no tokens left.
674 (cp_parser_namespace_alias_definition): Only consume the next token if
675 it is a closing brace.
677 * parser.c (cp_parser_class_specifier): Likewise.
679 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
681 * semantics.c (finish_member_declaration): Fix a typo in the
684 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
696 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
697 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
698 * pt.c (check_for_bare_parameter_packs): Return bool indicated
699 whether everything was okay. Fix indentation.
700 (push_template_decl_real): Check for bare parameter packs in
701 function parameters; where errors occur, mark the parameter types
702 with ERROR_MARK_NODEs to avert ICEs.
703 (coerce_template_parameter_pack): New.
704 (coerce_template_parms): Moved parameter pack coercion into
705 coerce_template_parameter_pack, and permit it anywhere in the
706 template parameter list (not just at the end). Parameter and
707 argument indices can vary (somewhat) separately now, so add
708 PARM_IDX and ARG_IDX.
709 (fn_type_unification): Don't set an argument pack as incomplete if
710 no argument pack was deduced.
711 (type_unification_real): If a type parameter is a parameter pack
712 and has not otherwise been deduced, it will be deduced to an empty
714 (more_specialized_fn): Use the actual lengths of the argument
715 lists when comparing against expansions.
716 * semantics.c (finish_member_declaration): If a field's type has
717 bare parameter packs, error and set its type to ERROR_MARK_NODE.
719 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
722 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
724 2007-05-22 Ollie Wild <aaw@google.com>
726 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
727 (unqualified_namespace_lookup): Adds check for hidden types.
729 2007-05-22 Ollie Wild <aaw@google.com>
731 * decl.c (duplicate_decls): Verify namespace names are unique.
733 2007-05-21 Mark Mitchell <mark@codesourcery.com>
735 * decl.c (cxx_maybe_build_cleanup): Handle
736 __attribute__((cleanup)).
738 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
740 * cvt.c (cp_convert_and_check): Don't check warnings if the
743 2007-05-18 Geoffrey Keating <geoffk@apple.com>
745 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
747 2007-05-14 Paolo Carlini <pcarlini@suse.de>
750 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
751 type only if is a class type (5.2.8/4).
753 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
755 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
756 * decl.c (grokdeclarator): Use unsigned_type_for instead of
757 c_common_unsigned_type.
759 2007-05-11 Silvius Rus <rus@google.com>
761 * cp/typeck.c (build_indirect_ref): Add call to
762 strict_aliasing_warning.
763 (build_reinterpret_cast_1): Condition call to
764 strict_aliasing_warning.
766 2007-05-11 Jan Hubicka <jh@suse.cz>
768 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
769 * decl2.c (start_objects): ctors and dtors are no longer public.
770 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
772 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
774 * typeck.c (build_unary_op): Remove code that used to
775 handle non lvalue increments/decrements.
777 2007-05-07 Mike Stump <mrs@apple.com>
779 * parser.c (check_empty_body): Add.
780 (cp_parser_iteration_statement): Add call to check_empty_body.
782 2007-05-05 Geoffrey Keating <geoffk@apple.com>
785 * mangle.c (write_mangled_name): Mangle static variable names.
786 (write_unqualified_name): Use local-source-name for
787 namespace-scope static variables.
789 2007-05-04 Dirk Mueller <dmueller@suse.de>
791 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
794 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
797 * decl2.c (constrain_class_visibility):
798 Use strip_pointer_or_array_types instead of strip_array_types.
800 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
803 * decl.c (reshape_init_r): Don't reshape the first element if it
804 is a pointer to member function.
806 2007-04-27 Simon Baldwin <simonb@google.com>
808 * decl.c (grokparms): Changed message format from %qD to %qE.
810 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
812 * error.c (maybe_warn_variadic_templates): Variadic templates are
813 now in C++0x, so only warn about them in C++98 mode.
815 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
818 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
819 integeral types from vectors types.
821 2007-04-26 Jakub Jelinek <jakub@redhat.com>
824 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
825 for type dependent OMP_CLAUSE_DECLs.
827 2007-04-24 Mark Mitchell <mark@codesourcery.com>
830 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
831 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
832 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
833 * init.c (build_zero_init): Adjust, as
834 COMPLEX_TYPE is now a SCALAR_TYPE.
835 * typeck2.c (digest_init): Allow brace-enclosed initializers for
836 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
838 2007-04-25 Paolo Carlini <pcarlini@suse.de>
840 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
841 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
842 (trait_expr_value): Adjust.
844 2007-04-23 Simon Baldwin <simonb@google.com>
846 * decl.c (grokparms): Added new error for duplicate function
847 parameters names in function prototypes, to match gcc behavior.
849 2007-04-23 Jan Hubicka <jh@suse.cz>
851 * cp/decl2.c (finish_objects): Do not call target constructor/destructor
854 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
856 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
857 instead of checking GIMPLE_STMT_P in chain_next.
859 2007-04-17 Mark Mitchell <mark@codesourcery.com>
862 * call.c (convert_for_arg_passing): Convert bitfields to their
865 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
868 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
870 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
874 * cp/decl2.c (constrain_class_visibility):
875 Do not warn about the use of anonymous namespace in the main input file.
877 2007-04-15 Mark Mitchell <mark@codesourcery.com>
879 * cp-tree.h (current_template_parms): Fix typo in comment.
881 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
883 * cp-tree.h, error.c: Fix comment typos.
885 2007-04-13 Jason Merrill <jason@redhat.com>
888 * call.c (reference_binding): Add c_cast_p parm. If true,
889 add quals to TO as needed to make it reference-compatible.
891 2007-04-11 Jan Hubicka <jh@suse.cz>
893 * cp/class.c (convert_to_base_statically): Fold produced tree; verify
894 that we are not processing template_decl.
896 2007-04-09 Mark Mitchell <mark@codesourcery.com>
899 * class.c (build_base_path): Ensure that the converted pointer has
900 the same cv-qualification as the input.
902 2007-04-09 Paolo Carlini <pcarlini@suse.de>
904 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
906 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
908 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
910 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
911 * tree.c (cp_add_pending_fn_decls): Remove.
912 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
914 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
916 Revert change removing staticp.
918 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
920 * cp-objcp-common.c (cxx_staticp): Remove.
921 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
922 * cp-tree.h (cxx_staticp):
924 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
926 * class.c (check_for_override): Don't remove dllmport attribute
929 2007-04-03 Jakub Jelinek <jakub@redhat.com>
932 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
933 type issue error and return early.
935 2007-03-30 Jason Merrill <jason@redhat.com>
938 * typeck.c (cp_type_readonly): New fn.
939 * cp-tree.h: Declare it.
940 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
941 (cp_finish_decl): Not here.
943 2007-03-31 Richard Guenther <rguenther@suse.de>
945 * optimize.c (maybe_clone_body): Replace splay-tree usage by
948 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
953 * parser.c (declarator_can_be_parameter_pack): New.
954 (cp_parser_template_parameter): Only parse the `...' if the
955 declarator can be a parameter pack.
956 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
958 * pt.c (find_parameter_packs_r): Look into the bounds on integer
959 types (they could be used as array bounds).
960 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
961 (tsubst_pack_expansion): Handle failure to expand parameter
964 2007-03-30 Paolo Carlini <pcarlini@suse.de>
967 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
968 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
969 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
970 (CLASS_TYPE_NON_UNION_P): Add.
971 (struct lang_type_class): Add has_complex_dflt.
972 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
973 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
974 * cp-tree.def: Add TRAIT_EXPR.
975 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
976 * lex.c (struct resword): Add __has_nothrow_assign,
977 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
978 __has_trivial_constructor, __has_trivial_copy,
979 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
980 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
981 __is_pod, __is_polymorphic, __is_union.
982 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
983 (cp_parser_trait_expr): New.
984 * semantics.c (finish_trait_expr, trait_expr_value
985 classtype_has_nothrow_copy_or_assign_p): New.
986 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
988 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
989 * class.c (check_bases, check_field_decl, check_bases_and_members):
990 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
991 * pt.c (uses_template_parms, tsubst_copy_and_build,
992 value_dependent_expression_p, type_dependent_expression_p): Deal with
994 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
996 2007-03-29 Richard Guenther <rguenther@suse.de>
998 * tree.c (cp_walk_subtrees): Do not set input_location.
1000 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
1003 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
1006 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1008 * parser.c (struct cp_parser): Update comment for
1009 greater_than_is_operator_p.
1010 (cp_parser_primary_expression): In C++0x mode, a cast operator can
1011 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
1012 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
1013 !GREATER_THAN_IS_OPERATOR_P.
1014 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
1015 `>>' operators that will become two `>' tokens in C++0x.
1016 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
1017 mode, allowing it to terminate default arguments.
1018 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
1019 `>>' like two consecutive `>' tokens.
1020 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
1021 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
1022 ends a template argument.
1024 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1026 * decl.c (redeclaration_error_message): Complain when redeclaring
1027 a friend function with default template arguments (C++0x mode only).
1028 * cp-tree.h (check_default_tmpl_args): Declare.
1029 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
1030 template arguments in function templates. Add support for checking
1031 the default template arguments of friend templates.
1032 (push_template_decl_real): Fix call to check_default_tmpl_args.
1033 (type_unification_real): If a template parameter has not been
1034 deduced but provides a default template argument, substitute into
1035 that default template argument.
1036 * parser.c (cp_parser_init_declarator): When declaring (but not
1037 defining!) a function template in C++0x mode, check for default
1040 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1043 * decl.c (grokdeclarator): Deal with cv-qualified function type
1044 typedefs in the same way for member and non-member functions.
1046 2007-03-26 Dirk Mueller <dmueller@suse.de>
1048 * parser.c (cp_parser_member_declaration): Pedwarn
1049 about stray semicolons after member declarations.
1051 2007-03-26 Paolo Carlini <pcarlini@suse.de>
1054 * pt.c (instantiate_decl): Set in_system_header.
1056 2007-03-22 Mark Mitchell <mark@codesourcery.com>
1058 * cp-tree.h (current_tempalte_parms): Improve documentation.
1059 * pt.c (current_template_args): Likewise.
1062 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
1063 not consume tokens when failing.
1065 2007-03-22 Jim Wilson <wilson@specifix.com>
1066 Mark Mitchell <mark@codesourcery.com>
1069 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
1070 consistent with FROM.
1072 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1074 * error.c (dump_expr): Handle dependent names that designate types.
1075 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
1077 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
1079 * cp-tree.def, parser.c, pt.c: Fix comment typos.
1081 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1083 * cvt.c (cp_convert_and_check) : Define.
1084 * cp-tree.h (cp_convert_and_check): Declare.
1085 * call.c (convert_conversion_warnings): Rename to
1086 conversion_null_warnings. The warning for floating-point to
1087 integer is handled by convert_and_check in convert_like_real.
1088 (convert_like_real): convert_conversion_warnings was renamed as
1089 conversion_null_warnings.
1090 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
1091 overflow and changes of value during conversion.
1093 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1096 * parser.c (cp_parser_statement): If 'namespace' is found, this
1097 only can be a namespace alias definition, so parse it now.
1098 (cp_parser_namespace_alias_definition): if we find an open brace
1099 instead of '=', then this is actually a misplaced namespace
1102 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1105 * decl.c (cxx_init_decl_processing): Move command-line options
1106 processing to c-opts.c.
1108 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
1110 * ptree.c (cxx_print_type): Use formatting markup for integers
1111 when printing template parameter index/level/orig level.
1112 (cxx_print_xnode): Ditto.
1113 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
1114 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
1115 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
1117 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
1118 rather than a HOST_WIDE_INT.
1119 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
1120 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
1122 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
1123 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
1124 IN_BASE_INITIALIZER bool bitfields.
1125 (struct cp_declarator): Make KIND a 4-bit field. Make
1126 PARAMETER_PACK_P a bool bitfield just after KIND.
1127 * pt.c (uses_parameter_packs): Destroy the pointer set.
1128 (make_pack_expansion): Ditto.
1129 (check_for_bare_parameter_packs): Ditto.
1130 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
1132 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
1135 * call.c (convert_default_arg): Instead of copying the node,
1138 2007-03-15 Dirk Mueller <dmueller@suse.de>
1141 * call.c (convert_conversion_warnings): New..
1142 (convert_like_real): .. factored out from here.
1143 (convert_conversion_warnings): Add warning about
1144 false being converted to NULL in argument passing.
1146 2007-03-14 Dirk Mueller <dmueller@suse.de>
1148 * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
1149 (finish_do_body): Warn about empty body in do/while statement.
1151 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1153 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
1155 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1158 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
1161 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
1163 * cp/repo.c (init_repo): Initialize random_seed saved options.
1164 (finish_repo): Adjust.
1166 2007-03-13 Mark Mitchell <mark@codesourcery.com>
1169 * Make-lang.in (doc/g++.1): Use $< to specify the location from
1172 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
1174 * decl.c (compute_array_index_type): New warning flag warn_vla.
1176 2007-03-12 Mark Mitchell <mark@codesourcery.com>
1179 * call.c (convert_default_arg): Copy non-constant arguments.
1181 2007-03-11 Mark Mitchell <mark@codesourcery.com>
1184 * parser.c (cp_parser_postfix_expression): Disallow compound
1185 literals in constant expressions.
1188 * semantics.c (finish_typeof): Use unlowered_expr_type.
1190 2007-03-10 Mark Mitchell <mark@codesourcery.com>
1193 * cp-tree.h (unlowered_expr_type): New function.
1194 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
1195 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
1196 (unlowered_expr_type): New function.
1197 (build_unary_op): Disallow predecrements of bool bitfields.
1198 * call.c (build_conditional_expr): Use unlowered_expr_type.
1199 * pt.c (type_unification_real): Likewise.
1201 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
1204 * typeck.c (check_return_expr): Check for bare parameter packs.
1205 (comptypes): Compare template parameter packs and
1206 type pack expansions.
1207 * decl.c (grokdeclarator): Deal with the declaration of function
1209 (grokparms): Verify that the (optional) function parameter pack is
1210 at the end of the parameter list.
1211 (xref_basetypes): Handle pack expansions in the base class.
1212 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
1213 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
1214 (NONTYPE_ARGUMENT_PACK): New.
1215 (TYPE_PACK_EXPANSION): New.
1216 (EXPR_PACK_EXPANSION): New.
1217 (ARGUMENT_PACK_SELECT): New.
1218 * cp-objcp-common.c (cp_tree_size): Compute size of
1219 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
1220 ARGUMENT_PACK_SELECT.
1221 * error.c (dump_template_argument): Print template argument packs.
1222 (dump_template_argument_list): Ditto.
1223 (dump_template_parameter): Dump `...' for template type parameter
1225 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
1226 (dump_parameters): Print function parameter packs.
1227 (dump_template_parms): Print template argument packs.
1228 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
1229 (maybe_warn_variadic_templates): New.
1230 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
1231 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1232 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1234 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
1235 (write_template_arg): Write argument packs as separate arguments.
1236 * cp-tree.h (struct template_parm_index_s): Add flag that
1237 indicates that the template parameter is actually a parameter
1239 (struct tree_argument_pack_select): New.
1240 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
1241 (union lang_tree_node): Add argument_pack_select.
1242 (FUNCTION_PARAMETER_PACK_P): New.
1243 (PACK_EXPANSION_P): New.
1244 (PACK_EXPANSION_PATTERN): New.
1245 (SET_PACK_EXPANSION_PATTERN): New.
1246 (PACK_EXPANSION_PARAMETER_PACKS): New.
1247 (ARGUMENT_PACK_P): New.
1248 (ARGUMENT_PACK_ARGS): New.
1249 (SET_ARGUMENT_PACK_ARGS): New.
1250 (ARGUMENT_PACK_INCOMPLETE_P): New.
1251 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
1252 (TEMPLATE_PARM_PARAMETER_PACK): New.
1253 (TEMPLATE_TYPE_PARAMETER_PACK): New.
1254 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
1255 (ARGUMENT_PACK_SELECT_INDEX): New.
1256 (ARGUMENT_PACK_SELECT_ARG): New.
1257 (struct cp_declarator): Add parameter_pack_p flag.
1258 (maybe_warn_variadic_templates): Declare.
1259 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
1260 indicate a template parameter pack.
1261 (uses_parameter_packs): Declare.
1262 (template_parameter_pack_p): Declare.
1263 (template_parms_variadic_p): Declare.
1264 (make_pack_expansion): Declare.
1265 (check_for_bare_parameter_packs): Declare.
1266 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
1267 sizeof... expressions.
1268 (pp_cxx_expression): Print pack expansions and non-type argument
1270 (pp_cxx_exception_specification): Print pack expansions.
1271 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
1272 (pp_cxx_ctor_initializer): Print pack expansions.
1273 (pp_cxx_type_id): Print pack expansions.
1274 (pp_cxx_template_argument_list): Print argument packs.
1275 (pp_cxx_template_parameter): Print ellipsis for template parameter
1277 * pt.c (comp_template_parms): Compare template parameter packs.
1278 (template_parameter_pack_p): New.
1279 (template_parms_variadic_p): New.
1280 (template_args_variadic_p): New.
1281 (make_ith_pack_parameter_name): New.
1282 (struct find_parameter_pack_data): New.
1283 (find_parameter_packs_r): New.
1284 (uses_parameter_packs): New.
1285 (make_pack_expansion): New.
1286 (check_for_bare_parameter_packs): New.
1287 (expand_template_argument_pack): New.
1288 (reduce_template_parm_level): Propagate parameter pack flag.
1289 (process_template_parm): Add is_parameter_pack parameter to state
1290 when the parameter is actually a parameter pack. Create template
1291 parameter packs when is_parameter_pack is true.
1292 (current_template_args): The argument for a template parameter
1293 pack is an argument pack containing a single pack expansion.
1294 (process_partial_specialization): When checking that non-type
1295 argument expressions do not involve template parameters, loop over
1296 the arguments in argument packs separately.
1297 (push_template_decl_real): Check that the type of the declaration
1298 does not have any bare parameter packs. Check that primary
1299 templates have no more than one parameter pack, and that it comes
1300 at the end of the template parameter list.
1301 (convert_template_argument): Handle coercions for pack expansion
1302 expressions by coercing the pattern then rebuilding the expansion.
1303 (coerce_template_parms): When coercing the arguments for a
1304 variadic template, pack "extra" arguments into an argument pack.
1305 (coerce_template_template_parms): Cannot coerce between parameter
1306 packs and non-pack parameters.
1307 (template_args_equal): Compare PACK_EXPANSION_P expressions.
1308 (comp_template_args): Expand all template arguments packs before
1309 comparing template argument lists.
1310 (mangle_class_name_for_template): Make argument packs as separate
1312 (for_each_template_parm_r): No need to handle BASELINK.
1313 (instantiate_class_template): Handle pack expansions in the base
1315 (tsubst_pack_expansion): New.
1316 (tsubst_template_args): Handle substitutions of argument packs and
1317 pack expansion into template argument lists.
1318 (tsubst_decl): Expand function parameter packs into separate
1319 function parameters.
1320 (tsubst_arg_types): Expand a type pack expansion into separate
1322 (tsubst_exception_specification): Handle pack expansions in
1323 exception specifiers.
1324 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
1325 replacing a template parameter with its argument. If we encounter
1326 a substitution for an argument pack, just return the parameter
1328 (tsubst_copy): sizeof(X...) returns the number of elements in
1329 parameter pack X. See through ARGUMENT_PACK_SELECT when the
1330 PARM_DECL is a parameter pack.
1331 (tsubst_expr): Expression pack expansions and argument packs
1332 cannot show up here; they will all be handled through function
1333 calls, sizeof, and template argument lists.
1334 (tsubst_copy_and_build): sizeof(X...) returns the number of
1335 elements in parameter pack X. Handle pack expansions in TREE_LIST
1336 and CONSTRUCTOR nodes.
1337 (fn_type_unification): Handle "incomplete" explicit template
1338 argument lists that specify some of the arguments for a template
1340 (type_unification_real): Unify arguments against pack expansions.
1341 (template_parm_level_and_index): New, helper function.
1342 (unify_pack_expansion): New.
1343 (unify): Unify argument packs on an argument-by-argument basis,
1344 handling variadic argument packs as well.
1345 (more_specialized_fn): Handle unification of function parameter
1346 packs. All things being equal, prefer non-variadic function
1347 templates to variadic function templates.
1348 (more_specialized_class): Prefer the variadic class template
1349 partial specialization that binds fewer arguments to a parameter
1351 (regenerate_decl_from_template): Expand function parameter packs
1352 into separate parameters.
1353 (instantiate_decl): Ditto.
1354 (tsubst_initializer_list): Handle pack expansions for base-class
1356 (dependent_type_p_r): Determine dependent types in argument packs
1357 and pack expansions.
1358 (value_dependent_expression_p): Determine value-dependence of
1359 non-type argument packs.
1360 (dependent_template_arg_p): Handle argument packs.
1361 * semantics.c (finish_cond): Check for bare parameter packs.
1362 (finish_expr_stmt): Ditto.
1363 (finish_for_expr): Ditto.
1364 (finish_switch_cond): Ditto.
1365 (finish_mem_initializers): Ditto.
1366 * name-lookup.c (arg_assoc_type): Handle pack expansions and
1368 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
1369 * parser.c (make_declarator): Declarator is not an expansion.
1370 (make_pointer_declarator): Transfer parameter pack flag to outer
1372 (make_reference_declarator): Ditto.
1373 (make_ptrmem_declarator): Ditto.
1374 (make_call_declarator): Ditto.
1375 (make_array_declarator): Ditto.
1376 (cp_parser_postfix_expression): Allow pack expansion expressions
1377 in the argument list for a call expression.
1378 (cp_parser_parenthesized_expression_list): Add new parameter
1379 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
1380 into separate arguments."
1381 (cp_parser_new_placement): Allow pack expansion expressions.
1382 (cp_parser_new_initializer): Ditto.
1383 (cp_parser_mem_initializer_list): Allow ellipsis to create a
1384 base-class initializer expansion.
1385 (cp_parser_mem_initializer): Ditto.
1386 (cp_parser_template_parameter_list): Keep track of whether the
1387 template parameter is a template parameter pack.
1388 (cp_parser_template_parameter): Parse the ellipsis to indicate a
1389 template parameter pack.
1390 (cp_parser_type_parameter): Ditto.
1391 (cp_parser_template_argument_list): Parse the ellipsis to indicate
1393 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
1394 this declarator is a parameter pack.
1395 (cp_parser_parameter_declaration): The ellipsis does not end the
1396 parameter declaration, because it might be a parameter pack. Parse
1397 the ellipsis to indicate a parameter pack.
1398 (cp_parser_initializer): Allow pack expansions.
1399 (cp_parser_initializer_list): Allow ellipsis to create an
1400 initializer expansion.
1401 (cp_parser_base_clause): Allow ellipsis to create a base specifier
1403 (cp_parser_type_id_list): Allow ellipsis to create an exception
1404 specifier expansion.
1405 (cp_parser_attribute_list): Don't allow pack expansions.
1406 (cp_parser_functional_cast): Allow pack expansions.
1407 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
1408 compute the length of a parameter pack.
1409 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
1410 end a template argument.
1411 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1412 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1415 2007-03-09 Dirk Mueller <dmueller@suse.de>
1417 * cp/call.c (build_new_op): Call warn_logical_operator.
1419 2007-03-08 Volker Reichelt <reichelt@netcologne.de>
1422 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
1425 * pt.c (any_template_arguments_need_structural_equality_p):
1428 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
1430 * decl.c (grokdeclarator): Disable warnings for anonymous
1433 2007-03-05 Volker Reichelt <reichelt@netcologne.de>
1435 * typeck2.c (readonly_error): Always emit a hard error.
1436 Remove last argument.
1437 * cp-tree.h (readonly_error): Adjust prototype.
1438 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
1439 * typeck.c (build_unary_op): Likewise.
1440 (build_modify_expr): Likewise.
1442 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
1445 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
1447 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1450 * parser.c (struct cp_parser): New IN_IF_STMT.
1451 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
1452 returning if parsing the body of an 'if' statement or issuing an
1453 error and continuing.
1454 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
1456 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
1458 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
1461 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
1464 2007-03-02 Geoffrey Keating <geoffk@apple.com>
1466 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
1467 Objective-C++. Don't exit early if -shared-libgcc needs to be
1470 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1472 * typeck.c (common_base_type): Delete unused function.
1474 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
1476 * Make-lang.in: Add dummy lang.install-pdf target.
1478 2007-03-01 Simon Baldwin <simonb@google.com>
1481 * decl.c (check_tag_decl): Added new warning for typedef ignored
1482 when it precedes an otherwise valid non-typedef declaration.
1484 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
1486 * typeck.c (build_function_call): Store converted arguments
1487 in a stack-allocated array instead of building a list.
1488 (convert_arguments): Store arguments in the array passed in as an
1489 argument, and return the actual number of arguments.
1490 * call.c (build_call): Delete, and replace with...
1491 (build_call_n, build_call_a): New.
1492 (build_op_delete_call): Rewrite to avoid constructing argument lists.
1493 (build_over_call): Store converted arguments in a stack-allocated
1494 array instead of building a list.
1495 (build_cxx_call): Pass arguments in an array instead of as a list.
1496 (build_java_interface_fn_ref): Rewrite to avoid constructing
1498 * tree.h: Update declarations to reflect above changes.
1499 * method.c (use_thunk): Use a stack-allocated array to hold
1500 the arguments instead of a list.
1501 * rtti.c (throw_bad_cast): Update call to cxx_call.
1502 (throw_bad_typeid): Likewise.
1503 (build_dynamic_cast_1): Likewise.
1504 * init.c (build_builtin_delete_call): Use build_call_n.
1505 * decl.c (expand_static_init): Likewise.
1506 * except.c (cp_protect_cleanup_actions): Likewise.
1507 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
1508 (gimplify_must_not_throw_expr): Likewise.
1509 (cxx_omp_apply_fn): Use build_call_a.
1511 2007-02-26 Mark Mitchell <mark@codesourcery.com>
1513 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
1514 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
1516 2007-02-25 Mark Mitchell <mark@codesourcery.com>
1518 * cp-tree.h (static_ctors): Remove.
1519 * cp-tree.h (static_dtors): Likewise.
1520 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
1521 refactoring of tree_map hierarchy.
1522 (decl_shadowed_for_var_insert): Likewise.
1523 * semantics.c (expand_body): Use c_expand_body.
1524 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
1525 * decl2.c (static_ctors): Remove.
1526 (static_dtors): Likewise.
1527 (generate_ctor_or_dtor_function): Pass NULL_TREE to
1528 objc_generate_static_init_call. Do not call static_[cd]tors.
1529 (generate_ctor_and_dtor_functions_for_priority): Do not check for
1531 (cp_write_global_declarations): Likewise.
1533 2007-02-23 Richard Guenther <rguenther@suse.de>
1535 * class.c (note_name_declared_in_class): Make declaration
1536 changes meaning a pedwarn.
1538 2007-02-22 Michael Matz <matz@suse.de>
1541 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
1542 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
1543 dump_function_decl): Guard emitting outer scopes by new flag.
1544 * cp-lang.c (cxx_dwarf_name): New function.
1545 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
1546 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
1548 (push_template_decl_real, lookup_template_class): Remove calls
1551 2007-02-19 Mark Mitchell <mark@codesourcery.com>
1553 * call.c (build_new_method_call): Ensure that explicit calls of
1554 destructors have type "void".
1556 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1558 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
1559 and -Walways-true with -Waddress.
1560 * cvt.c (convert_to_void): Replace unconditional warning with
1563 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
1565 * decl.c, tree.c: Fix comment typos.
1567 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1570 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
1571 statement expression if we had an error mark node.
1573 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
1574 Brooks Moses <brooks.moses@codesourcery.com>
1575 Lee Millward <lee.millward@codesourcery.com>
1577 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
1578 Change class to tcc_vl_exp.
1580 * call.c (build_call): Use build_call_list instead
1582 (build_over_call): Likewise.
1583 (build_new_method_call): Use build_min_non_dep_call_list
1584 instead of build_min_non_dep.
1586 * error.c (dump_call_expr_args): New function.
1587 (dump_aggr_init_expr_args): New function.
1588 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
1589 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
1591 * cvt.c (convert_to_void): Use build_call_array instead
1592 of build3; use new AGGR_INIT_EXPR accessor macros.
1594 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
1595 instead of TREE_CODE_LENGTH.
1597 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
1598 AGGR_INIT_EXPR accessor macros.
1600 * cp-gimplify.c (cp_gimplify_init_expr): Use
1601 AGGR_INIT_EXPR_SLOT to set the slot operand.
1603 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
1604 (AGGR_INIT_EXPR_SLOT): New macro.
1605 (AGGR_INIT_EXPR_ARG): New macro.
1606 (aggr_init_expr_nargs): New macro.
1607 (AGGR_INIT_EXPR_ARGP): New macro.
1608 (aggr_init_expr_arg_iterator): New.
1609 (init_aggr_init_expr_arg_iterator): New.
1610 (next_aggr_init_expr_arg): New.
1611 (first_aggr_init_expr_arg): New.
1612 (more_aggr_init_expr_args_p): New.
1613 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
1614 (stabilize_aggr_init): New declaration.
1615 (build_min_non_dep_call_list): Likewise.
1617 * tree.c (process_aggr_init_operands): New function.
1618 (build_aggr_init_array) New function.
1619 (build_cplus_new): Update to use new CALL_EXPR and
1620 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
1621 build_aggr_init_array.
1622 (build_min_non_dep_call_list) New function.
1623 (build_min_nt): Assert input code parameter is not a variable
1624 length expression class.
1625 (build_min, build_min_non_dep): Likewise.
1626 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
1627 to check for equality instead of recursing. Handle tcc_vl_exp
1629 (stabilize_call): Update to only handle CALL_EXPRs, not
1630 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
1631 (stabilize_aggr_init): New function.
1632 (stabilize_init): Use it.
1634 * cxx-pretty-print.c (pp_cxx_postfix_expression)
1635 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
1636 AGGR_INIT_EXPR accessor macros and argument iterators.
1638 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
1639 build_vl_exp. Iterate through the operands, recursively
1640 processing each one.
1641 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
1642 CALL_EXPR accessor macros.
1643 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
1644 tree code classes. Use TREE_OPERAND_LENGTH instead of
1647 * semantics.c (finish_call_expr): Use build_nt_call_list
1648 instead of build_nt.
1649 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
1650 accessor macros. Use build_call_array to construct the
1651 CALL_EXPR node instead of build3
1653 * decl2.c (build_offset_ref_call_from_tree): Use
1654 build_nt_call_list and build_min_non_dep_call_list instead
1655 of build_min_nt and build_min_non_dep.
1657 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
1658 Use build_nt_call_list instead of build_min_nt.
1660 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1663 * call.c (build_conditional_expr): Improve error message.
1665 2007-02-13 Dirk Mueller <dmueller@suse.de>
1667 * friend.c (do_friend): Annotate warning about friend
1668 declarations in templates with OPT_Wnon_template_friend.
1669 Convert informal message from warning() to inform().
1671 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
1672 Mark Mitchell <mark@codesourcery.com>
1675 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
1676 instantiations for variables.
1678 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1681 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
1682 Check warn_unused_value just once.
1684 2007-02-11 Mark Mitchell <mark@codesourcery.com>
1687 * pt.c (determine_specialization): Use skip_artificial_parms_for.
1688 (fn_type_unificiation): Likewise.
1689 (get_bindings): Likewise.
1691 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
1694 * decl.c (finish_function): Use DECL_REPLACEABLE.
1695 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1697 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
1699 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
1701 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
1703 * decl.c (grokvardecl): Don't error if !have_tls.
1704 (grokdeclarator): Likewise.
1705 * parser.c (cp_parser_omp_threadprivate): Likewise.
1707 2007-02-07 Jakub Jelinek <jakub@redhat.com>
1710 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
1711 parameters and result decls in omp clauses.
1712 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
1715 2007-02-05 Dirk Mueller <dmueller@suse.de>
1718 * parser.c (cp_parser_class_specifier): Always initialize bases.
1720 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
1722 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
1723 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
1724 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
1726 * semantics.c (finish_omp_atomic): Store a whole expression node
1727 in operand 1, and integer_zero_node in operand 0, for dependent
1728 OMP_ATOMIC. Rewrite to make flow easier to understand.
1730 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1732 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
1734 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
1736 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
1737 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
1739 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
1741 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
1742 keyword warning to -Wc++0x-compat.
1744 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1746 * decl.c (grokdeclarator): Update documentation.
1748 2007-02-02 Jakub Jelinek <jakub@redhat.com>
1751 * decl.c (grokdeclarator): If __thread is used together with
1752 a storage class other than extern and static, clear thread_p
1753 after issuing diagnostics and fall through to checking the
1756 2007-01-30 Roger Sayle <roger@eyesopen.com>
1758 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
1759 calculating the size of an array (to avoid recursive errors).
1761 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1764 * typeck.c (build_binary_op): Fix logic for warning. Move warning
1766 * call.c (convert_like_real): Don't warn when converting to
1769 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1771 * decl.c (pop_label): Replace warning with call to
1772 warn_for_unused_label.
1774 2007-01-28 Andrew Pinski <pinskia@gmail.com>
1777 * semantics.c (finish_pseudo_destructor_expr): Check the
1778 destrutor name by calling check_dtor_name.
1780 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
1782 * lex.c (D_CPP0X): Rename.
1784 (reswords): D_CPP0X -> D_CXX0X.
1785 (init_reswords): Ditto.
1786 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
1787 of C++0x keywords as identifiers.
1789 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
1792 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
1795 2007-01-23 Ian Lance Taylor <iant@google.com>
1797 * typeck.c (convert_for_assignment): Only warn about a = b = c
1798 when converting to bool.
1800 2007-01-23 Roger Sayle <roger@eyesopen.com>
1802 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
1804 * typeck.c (ignore_overflows): Remove the remaining uses of
1805 TREE_CONSTANT_OVERFLOW.
1807 2007-01-20 Jan Hubicka <jh@suse.cz>
1809 * decl2.c (start_objects, start_static_storage_duration_function):
1810 Do not make the functions uninlinable.
1812 2007-01-17 Ian Lance Taylor <iant@google.com>
1814 * class.c (add_method): Call VEC_reserve_exact rather than passing
1815 a negative size to VEC_reserve.
1817 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
1820 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
1822 2007-01-10 Mark Mitchell <mark@codesourcery.com>
1825 * decl.c (make_typename_type): If the qualified name is not a
1826 type, issue an error.
1827 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
1830 2007-01-08 Geoffrey Keating <geoffk@apple.com>
1832 * rtti.c: Include target.h.
1833 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
1834 don't emit typeinfo for fundamental types as weak.
1835 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
1837 2007-01-08 Richard Guenther <rguenther@suse.de>
1839 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
1841 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
1843 * call.c (standard_conversion): Pass flag to
1844 vector_types_convertible_p to disallow emission of note.
1845 * typeck.c (convert_for_assignment): Pass flag to
1846 vector_types_convertible_p to allow emission of note.
1847 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
1848 to disallow emission of note.
1850 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1853 * typeck.c (build_binary_op): Call overflow_warning if
1854 TREE_OVERFLOW_P is true for the result and not for any of the
1857 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
1860 * class.c (add_method): Don't wait until template
1861 instantiation time to complain about duplicate methods.
1863 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1866 * semantics.c (finish_unary_op_expr): Warn only if result
1867 overflowed and operands did not.
1869 2007-01-05 Ian Lance Taylor <iant@google.com>
1871 * typeck.c (build_binary_op): Warn about comparing a non-weak
1874 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
1876 * pt.c (tsubst): Propagate the need for structural equality checks
1877 when reducing the level of template parameters.
1879 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
1881 * pt.c: Fix a comment typo.
1883 2007-01-02 Ian Lance Taylor <iant@google.com>
1885 * semantics.c (maybe_convert_cond): Optionally warn when using an
1886 assignment as a condition.
1887 * typeck.c (convert_for_assignment): Optionally warn about
1888 assigning the result of an assignment to a bool.
1890 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
1892 * pt.c (canonical_template_parms): Correct typo in comment.
1894 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
1896 * typeck.c (structural_comptypes): Renamed from "comptypes".
1897 (comptypes): Use canonical type information to perform fast type
1898 comparison. When VERIFY_CANONICAL_TYPES, verify that the
1899 canonical type comparison returns the same results as we would see
1900 from the current, structural check. Support COMPARE_STRUCTURAL
1901 when we need structural checks.
1902 * decl.c (typename_compare): Fix comment.
1903 (build_typename_type): TYPENAME_TYPE nodes require structural
1904 equality checks, because they resolve different based on the
1906 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
1907 require structural equality checks (for now).
1908 (build_ptrmemfunc_type): Build the canonical pointer to member
1910 (compute_array_index_type): Whenever we build a new index type
1911 to represent the size of an array in a template, we need to mark
1912 this index type as requiring structural equality. This goes for
1913 arrays with value-dependent sizes with the current ABI, or all
1915 * tree.c (cplus_array_hash): New.
1916 (struct cplus_array_info): New.
1917 (cplus_array_compare): New.
1918 (cplus_array_htab): New.
1919 (build_cplus_array_type_1): Use a hash table to cache the array
1920 types we build. Build the canonical array type for each array
1922 (cp_build_qualified_type_real): When building a cv-qualified array
1923 type, use the hash table of array types and build canonical array
1925 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
1926 use structural equality (for now).
1927 * cp-tree.h (COMPARE_STRUCTURAL): New.
1928 * pt.c (canonical_template_parms): New.
1929 (canonical_type_parameter): New.
1930 (process_template_parm): Find the canonical type parameter.
1931 (lookup_template_class): When we have named the primary template
1932 type, set the canonical type for our template class to the primary
1933 template type. If any of the template arguments need structural
1934 equality checks, the template class needs structural equality
1936 (tsubst): When reducing the level of a template template
1937 parameter, we require structural equality tests for the resulting
1938 parameter because its template parameters have not had their types
1939 canonicalized. When reducing a template type parameter, find the
1940 canonical reduced type parameter.
1941 (any_template_arguments_need_structural_equality_p): New.